{ "id": "126482", "key": "AC-1806", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "11", "description": "Is not a bug in our product", "name": "Not Our Bug" }, "resolutiondate": "2014-03-12T21:44:13.000+0000", "created": "2014-02-17T17:51:38.000+0000", "labels": [ "flightmode", "ios", "mobile", "network", "networking", "online" ], "versions": [], "issuelinks": [], "assignee": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:40:42.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "When querying Ti.Network.networkType on a physical device iPhone 5S (iOS 7.0.5) switched to flight mode (airplane mode) the result is Ti.Network.NETWORK_MOBILE and not Ti.Network.NETWORK_NONE as one would expect.\r\n\r\nI am using Titanium SDK 3.2.1.GA on Mac OS X 10.9.1.\r\n\r\nThe code to test this behaviour is as follows:\r\n\r\nalert(Ti.Network.getNetworkType()); // prints '2' (NETWORK_MOBILE) when in flight mode\r\n\r\nIf I switch off flight mode and switch off 'Mobile Data' in the Settings app, I get '0' (NETWORK_NONE) as expected.\r\n\r\n\r\nSame issue can be observed in the KitchenSink App on tab Platform, Row Network. Enter page with WIFI on, it displays type: 1, online: true name: WIFI correctly. Then enter into flight mode (but keep Mobile Data switched on). Shortly, the info turns to type: 0, online: false name: NONE, which is correct. Then it updates again, turning to type: 2, online: true name: MOBILE, which is wrong.\r\n\r\n\r\n", "attachment": [ { "id": "46567", "filename": "Reachability-AirplaneMode-5SecondsLater.png", "author": { "name": "davehudson", "key": "davehudson", "displayName": "Dave Hudson", "active": true, "timeZone": "Europe/London" }, "created": "2014-03-12T10:34:25.000+0000", "size": 70331, "mimeType": "image/png" }, { "id": "46568", "filename": "Reachability-AirplaneMode-Initially.png", "author": { "name": "davehudson", "key": "davehudson", "displayName": "Dave Hudson", "active": true, "timeZone": "Europe/London" }, "created": "2014-03-12T10:34:25.000+0000", "size": 52507, "mimeType": "image/png" }, { "id": "46569", "filename": "Reachability-Cellular.png", "author": { "name": "davehudson", "key": "davehudson", "displayName": "Dave Hudson", "active": true, "timeZone": "Europe/London" }, "created": "2014-03-12T10:34:25.000+0000", "size": 63461, "mimeType": "image/png" } ], "flagged": false, "summary": "Ti.Network.networkType === Ti.Network.NETWORK_MOBILE when in flight mode on iPhone device", "creator": { "name": "matthias.burbach@tui.de", "key": "matthias.burbach@tui.de", "displayName": "Matthias Burbach", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "matthias.burbach@tui.de", "key": "matthias.burbach@tui.de", "displayName": "Matthias Burbach", "active": true, "timeZone": "Europe/Berlin" }, "environment": "Titanium SDK 3.2.0 GA & SDK 3.2.1 GA on Mac OS X 10.9.1.\r\niPhone 5 (iOS 7.0.3) and iPhone 5S (iOS 7.0.5) ", "comment": { "comments": [ { "id": "293472", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I tried this on an iPhone 4S device and I get 0, as expected, when I switch phone to \"Airplane mode\". I see \"Cellular\" option being greyed out when the phone is in airplane mode so could not control these two settings independently. Is the reported behavior specific to iPhone 5s?", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-18T01:47:30.000+0000", "updated": "2014-02-18T01:47:30.000+0000" }, { "id": "293499", "author": { "name": "matthias.burbach@tui.de", "key": "matthias.burbach@tui.de", "displayName": "Matthias Burbach", "active": true, "timeZone": "Europe/Berlin" }, "body": "I will test myself on iPhone 4(S) as soon as I get hold of one. It may be specific to 5(S). Please note on 5S it shows the correct value for a short period of time but then automatically updates to the wrong value. Did you check KitchenSink for a minute or so to make sure it doesn't switch either after a while?\nCellular option is greyed out on 5S too when in airplane mode, but on my device it makes all the difference whether I have switched off Cellular before going to airplane mode or not.", "updateAuthor": { "name": "matthias.burbach@tui.de", "key": "matthias.burbach@tui.de", "displayName": "Matthias Burbach", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-02-18T07:16:38.000+0000", "updated": "2014-02-18T07:16:38.000+0000" }, { "id": "293514", "author": { "name": "matthias.burbach@tui.de", "key": "matthias.burbach@tui.de", "displayName": "Matthias Burbach", "active": true, "timeZone": "Europe/Berlin" }, "body": "My colleague has tested the same on iPhone 4 and he found exactly the same false behaviour as I did on iPhone 5S. Please test once more yourself. \nThere is also evidence from other users on http://developer.appcelerator.com/question/162644/tinetworknetworktype--tinetworknetworkmobile-when-in-flight-mode-on-iphone-device\n ", "updateAuthor": { "name": "matthias.burbach@tui.de", "key": "matthias.burbach@tui.de", "displayName": "Matthias Burbach", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-02-18T14:30:55.000+0000", "updated": "2014-02-18T14:30:55.000+0000" }, { "id": "293527", "author": { "name": "davehudson", "key": "davehudson", "displayName": "Dave Hudson", "active": true, "timeZone": "Europe/London" }, "body": "Just wanted to backup what Matthias is saying and confirm there is definitely an issue with Airplane mode and detecting if a device is online. I'm not seeing this issue on all devices though which is strange.\n\nMy iPhone 4 running 7.0.2 correctly reports NONE when in Airplane mode. \n\nMy iPhone 5 running 7.0.3 correctly reports NONE in Airplane mode for about 5 seconds and then reports MOBILE even though it's still in Airplane mode.\n\n", "updateAuthor": { "name": "davehudson", "key": "davehudson", "displayName": "Dave Hudson", "active": true, "timeZone": "Europe/London" }, "created": "2014-02-18T16:30:28.000+0000", "updated": "2014-02-18T16:30:28.000+0000" }, { "id": "293567", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I still cannot reproduce it on iPhone 4S device. I will test it on iPhone 5 as soon as I get hold of one. ", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-18T18:56:07.000+0000", "updated": "2014-02-18T18:56:07.000+0000" }, { "id": "294035", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "After more investigation where we tested both iPhone 5 and 5S running 7.0.3 and 7.1 with Kitchen Sink and a sample app we wrote, we are still not able to reproduce this issue. Could you please provide us with a little more information so that we can dig deeper?\n\n[~davehudson], [~matthias.burbach@tui.de]\nWhere are you located? The ticket mentions iOS 7.0.5, which had some different changes for China and the UK, which we may not have.\nAlso, could you please provide some test code or a sample app that you know to show this error. We would like to work with as close to your environment/code/setup as possible.\n\nTo be clear, we followed these steps:\n# Start the app with WIFI and Mobile Data on, and Flight mode off\n# Notice that type = 1; name = WIFI\n# Turn on Flight mode\n# Notice that type = 0; name = NONE\n# Wait upwards of 1 min\n# Notice no change\n(We also tried turning off Mobile Data first, then turning on Flight mode, then turning Mobile Data on again. We did not see a change from type = 0; name = NONE)", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-02-20T23:08:34.000+0000", "updated": "2014-02-20T23:08:34.000+0000" }, { "id": "294092", "author": { "name": "matthias.burbach@tui.de", "key": "matthias.burbach@tui.de", "displayName": "Matthias Burbach", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hi,\nthanks for your work on this!\nI am located in Germany. My colleague is located in UK and was able to replicate the same false behaviour on his iPhone 4 (see above).\nThe steps you followed look absolutely fine to me.\n\nI think KitchenSink as sample app should be fine. Maybe it is worth checking how KitchenSink is built and deployed.\nI am using (excerpt from tiapp.xml):\n3.2.1.GA\ncom.appcelerator.kitchensink\nKitchenSink\n3.2.1\n\nJust pure guesswork, but maybe it has to do with some native event firing from the Cellular sub system depending on various dynamic conditions which have not much to do with the versions of the components we are testing with but more with the current connectivity state of the Cellular? Can you describe how Titanium links to the native APIs for the networkType API?\n\n\n\n", "updateAuthor": { "name": "matthias.burbach@tui.de", "key": "matthias.burbach@tui.de", "displayName": "Matthias Burbach", "active": true, "timeZone": "Europe/Berlin" }, "created": "2014-02-21T08:17:02.000+0000", "updated": "2014-02-21T08:17:02.000+0000" }, { "id": "294594", "author": { "name": "applification", "key": "applification", "displayName": "Dave Hudson", "active": true, "timeZone": "Europe/London" }, "body": "Hi Eric, \n\nSorry for the late reply. I am located in the UK also.", "updateAuthor": { "name": "applification", "key": "applification", "displayName": "Dave Hudson", "active": true, "timeZone": "Europe/London" }, "created": "2014-02-25T15:31:20.000+0000", "updated": "2014-02-25T15:31:20.000+0000" }, { "id": "295205", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It appears related to cellular system as we have not been able to reproduce this issue on multiple devices in US. Would it be possible for you to check this behavior with a simple native application over the same network?", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-03T02:32:38.000+0000", "updated": "2014-03-03T02:32:38.000+0000" }, { "id": "295240", "author": { "name": "applification", "key": "applification", "displayName": "Dave Hudson", "active": true, "timeZone": "Europe/London" }, "body": "Sure, I'd be happy to. Just let me know how to install the app you want me to test with.", "updateAuthor": { "name": "applification", "key": "applification", "displayName": "Dave Hudson", "active": true, "timeZone": "Europe/London" }, "created": "2014-03-03T09:47:40.000+0000", "updated": "2014-03-03T09:47:40.000+0000" }, { "id": "296558", "author": { "name": "davehudson", "key": "davehudson", "displayName": "Dave Hudson", "active": true, "timeZone": "Europe/London" }, "body": "Any update on this? This is a major issue for an app we need to release that the majority of target users will use offline in flight mode.", "updateAuthor": { "name": "davehudson", "key": "davehudson", "displayName": "Dave Hudson", "active": true, "timeZone": "Europe/London" }, "created": "2014-03-11T13:33:29.000+0000", "updated": "2014-03-11T13:33:29.000+0000" }, { "id": "296728", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Apple provides a nice Reachability sample application that demonstrates how to use the SystemConfiguration framework to monitor the network state of an iOS device. You should build and run this native application to determine the network state.\n\nhttps://developer.apple.com/library/ios/samplecode/Reachability/Introduction/Intro.html\n\nYou can use a code snippet like this to check the status (more details on Stack Overflow:http://stackoverflow.com/questions/1083701/how-to-check-for-an-active-internet-connection-on-iphone-sdk)\n{code}\nReachability* reachability = [Reachability sharedReachability];\n[reachability setHostName:@\"www.example.com\"]; // set your host name here\nNetworkStatus remoteHostStatus = [reachability remoteHostStatus];\n\nif(remoteHostStatus == NotReachable) { }\nelse if (remoteHostStatus == ReachableViaWiFiNetwork) { }\nelse if (remoteHostStatus == ReachableViaCarrierDataNetwork) { }\n{code}\n", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-12T05:52:58.000+0000", "updated": "2014-03-12T05:52:58.000+0000" }, { "id": "296760", "author": { "name": "davehudson", "key": "davehudson", "displayName": "Dave Hudson", "active": true, "timeZone": "Europe/London" }, "body": "FYI I downloaded and ran the Reachability app from here in the UK on my iPhone 5 on 7.0.3\r\n\r\nReachability-Cellular.png screenshot shows initial connection on my 3G connection. \r\n\r\nReachability-AirplaneMode-Initially.png screenshot shows what happens when you initially set Flight mode. \r\n\r\nReachability-AirplaneMode-5SecondsLater.png shows you what happens 5 seconds later. \r\n\r\nSeems consistent with Appcelerator KitchenSink app.", "updateAuthor": { "name": "davehudson", "key": "davehudson", "displayName": "Dave Hudson", "active": true, "timeZone": "Europe/London" }, "created": "2014-03-12T10:34:25.000+0000", "updated": "2014-03-12T10:34:25.000+0000" }, { "id": "296896", "author": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Unfortunately, this looks to be an Apple issue, then.\nThe reachability app is correctly showing that you are in airplane mode with wifi disabled.\nSince the app is giving the same results as KitchenSink and other test apps, this points to the apps correctly displaying the devices abilities.\n\nWe would recommend that you open an issue in Stack Overflow or open the issue with Apple.\nI will be closing this ticket as \"not our bug\".", "updateAuthor": { "name": "ewieber", "key": "ewieber", "displayName": "Eric Wieber", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-03-12T21:43:56.000+0000", "updated": "2014-03-12T21:43:56.000+0000" }, { "id": "297534", "author": { "name": "applification", "key": "applification", "displayName": "Dave Hudson", "active": true, "timeZone": "Europe/London" }, "body": "Just wanted to add that for anyone else who comes up against this issue it is indeed an Apple issue. Upgrading to iOS 7.1 does fix the problem.", "updateAuthor": { "name": "applification", "key": "applification", "displayName": "Dave Hudson", "active": true, "timeZone": "Europe/London" }, "created": "2014-03-17T14:13:08.000+0000", "updated": "2014-03-17T14:13:08.000+0000" }, { "id": "297573", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks for sharing this information. Appreciate it.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-17T16:49:26.000+0000", "updated": "2014-03-17T16:49:26.000+0000" } ], "maxResults": 17, "total": 17, "startAt": 0 } } }