{ "id": "162468", "key": "TIMOB-23747", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "18253", "name": "Release 5.5.0", "archived": false, "released": true, "releaseDate": "2016-09-13" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-08-09T23:54:57.000+0000", "created": "2016-08-08T21:41:37.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "handoff", "qe-5.4.0", "qe-5.5.0" ], "versions": [ { "id": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "issuelinks": [ { "id": "52339", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "154221", "key": "TIMOB-20220", "fields": { "summary": "iOS: Ti.App.iOS.continueactivity not being fired", "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" } }, "priority": { "name": "Critical", "id": "1" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "updated": "2016-08-16T20:27:02.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "*This is NOT a Regression.*\r\nWhen using the handoff feature between iOS devices, it was found that a titanium app crashes when handing off from an iOS9 device -> iOS8 device. See below:\r\n\r\nHanding off from {{iOS9Device1}} to {{iOS9Device2}}:\r\n*iOS9Device1:* Activity moved to a different device.\r\n*iOS9Device2:* continueactivity was fired.\r\n*Logs:* {{{color:#d04437}[ERROR] : UIAlertController is up and showing an alert. ABORTING showing of modal controller{color}}}\r\n\r\nHanding off from {{iOS9Device}} to {{iOS8Device}}:\r\n*iOS9Device:* Activity moved to a different device.\r\n*iOS8Device:* {color:#d04437}App crashes. {color}\r\n*Xcode Logs:* \r\n{code:java}\r\nAug 4 15:31:23 Spam kernel[0] : xpcproxy[1079] Container: /private/var/mobile/Containers/Data/Application/326B7AB3-16DB-4C33-94A6-B8BC41EF6A71 (sandbox)\r\nAug 4 15:31:23 Spam SamusTheBold[1079] : SOASTA TouchTest Build : 8244.160\r\nAug 4 15:31:23 Spam SamusTheBold[1079] : SOASTA TouchTest initializing...\r\nAug 4 15:31:23 Spam locationd[60] : Gesture EnabledForTopCLient: 0, EnabledInDaemonSettings: 0\r\nAug 4 15:31:23 Spam SamusTheBold[1079] : Process delegate TiApp(o) : TiHost : NSObject\r\nAug 4 15:31:23 Spam SamusTheBold[1079] : added ctDidFinishLaunchingWithOptions\r\nAug 4 15:31:23 Spam SamusTheBold[1079] : watching application:didFinishLaunchingWithOptions: : success\r\nAug 4 15:31:23 Spam SamusTheBold[1079] : added ctOpenURL\r\nAug 4 15:31:23 Spam SamusTheBold[1079] : watching openURL : success\r\nAug 4 15:31:23 Spam SamusTheBold[1079] : SOASTA TouchTest initialized in 103 msec (#51)\r\nAug 4 15:31:23 Spam SamusTheBold[1079] : assertion failed: 12D508: libxpc.dylib + 71792 [3C982BC2-5B46-305A-9A09-3C3D15332820]: 0x7d\r\nAug 4 15:31:23 Spam Unknown[1079] : \r\nAug 4 15:31:23 Spam SamusTheBold[1079] : [DEBUG] Reading stylesheet from: /private/var/mobile/Containers/Bundle/Application/9A54667A-1524-4020-B04D-7E23BBB19F46/SamusTheBold.app/stylesheet.plist\r\nAug 4 15:31:23 Spam SamusTheBold[1079] : [INFO] SamusTheBold/1.0 (5.4.0.16921ce)\r\nAug 4 15:31:23 Spam sharingd[59] : 15:31:23.340 : Requesting Handoff payload\r\nAug 4 15:31:23 Spam sharingd[59] : 15:31:23.643 : Received a new Handoff advertisement from \"SAMWISE\"\r\nAug 4 15:31:23 Spam sharingd[59] : [Warning] No delegate was registered that could handle protobuf BC060AC5-021F-4A2D-883F-5FDA9A177137\r\nAug 4 15:31:23 Spam sharingd[59] : [Warning] No delegate was registered that could handle protobuf BC060AC5-021F-4A2D-883F-5FDA9A177137\r\nAug 4 15:31:23 Spam sharingd[59] : 15:31:23.719 : Received requested Handoff payload from \"SAMWISE\" ((null))\r\nAug 4 15:31:23 Spam ReportCrash[1080] : task_set_exception_ports(B07, 400, D03, 0, 0) failed with error (4: (os/kern) invalid argument)\r\nAug 4 15:31:23 Spam ReportCrash[1080] : ReportCrash acting against PID 1079\r\nAug 4 15:31:23 Spam ReportCrash[1080] : Formulating crash report for process SamusTheBold[1079]\r\nAug 4 15:31:23 Spam SpringBoard[53] : BSXPCMessage received error for message: Connection invalid\r\nAug 4 15:31:23 Spam mediaserverd[22] : '' com.appc.SamusTheBold(pid = 1079) setting DiscoveryMode = DiscoveryMode_None, currentDiscoveryMode = DiscoveryMode_None\r\nAug 4 15:31:23 Spam com.apple.xpc.launchd[1] (UIKitApplication:com.appc.SamusTheBold[0xbad1][1079]) : Service exited due to signal: Segmentation fault: 11\r\nAug 4 15:31:23 Spam SpringBoard[53] : [MPUSystemMediaControls] Updating supported commands for now playing application.\r\nAug 4 15:31:23 Spam SpringBoard[53] : [MPUSystemMediaControls] Updating supported commands for now playing application.\r\nAug 4 15:31:23 Spam mediaserverd[22] : 'FigPlayer - 29' (pid = 29) setting DiscoveryMode = DiscoveryMode_None, currentDiscoveryMode = DiscoveryMode_None\r\nAug 4 15:31:23 Spam ReportCrash[1080] : Saved report to /var/mobile/Library/Logs/CrashReporter/SamusTheBold_2016-08-04-153123_Spam.ips\r\nAug 4 15:31:23 Spam SpringBoard[53] : Application 'UIKitApplication:com.appc.SamusTheBold[0xbad1]' crashed.\r\nAug 4 15:31:23 Spam assertiond[63] : pid_suspend failed for : Unknown error: -1, Unknown error: -1\r\nAug 4 15:31:23 Spam assertiond[63] : Could not set priority of to 2, priority: No such process\r\nAug 4 15:31:23 Spam assertiond[63] : Could not set priority of to 4096, priority: No such process\r\nAug 4 15:31:23 Spam SpringBoard[53] : Unable to deliver -[UIRemoteApplication showTopMostMiniAlertWithSynchronizationPort:] message to port 0: (ipc/send) invalid destination port\r\nAug 4 15:31:23 Spam sharingd[59] : 15:31:23.896 : Stopping Handoff scanning\r\n{code}\r\n\r\nHanding off from {{iOS8Device}} to {{iOS9Device}}:\r\n*iOS8Device:* Activity moved to a different device.\r\n*iOS9Device:* continueactivity was fired.\r\n\r\nh3. TEST CODE:\r\n{code:java}\r\nTi.API.info(\"Creating activity...\");\r\nvar win = Ti.UI.createWindow();\r\nwin.add(Ti.UI.createLabel({text: \"Check logs\",color: \"white\"}))\r\nvar activity = Ti.App.iOS.createUserActivity({\r\n activityType:'com.foo.message',\r\n title:'Handoff Messenger',\r\n userInfo:{\r\n msg: 'Tag! You\\'re it!'\r\n }\r\n});\r\n \r\n \r\n//if(!activity.isSupported()){\r\n// alert('activity is not supported');\r\n//} else {\r\n\tTi.API.info(\"Activity is supported...\");\r\n activity.becomeCurrent();\r\n//}\r\n \r\nactivity.addEventListener('useractivitywascontinued', function(e) {\r\n alert('Activity moved to a different device.');\r\n});\r\n \r\nTi.App.iOS.addEventListener('continueactivity', function(e){\r\n alert(\"continueactivity was fired\");\r\n if (e.activityType === 'com.foo.message' && e.userInfo.msg) {\r\n Ti.API.info(e.userInfo.msg);\r\n }\r\n});\r\n \r\nwin.open();\r\n \r\n/** -- tiapp.xml --\r\n \r\n\r\n\t\r\n\t\t\r\n\t\tNSUserActivityTypes\r\n\t\t\r\n\t\t\tcom.foo.message\r\n\t\t\tcom.foo.bar\r\n\t\t\r\n\t\t\r\n\t\r\n\r\n \r\n**/\r\n{code}\r\n\r\n\r\n\r\nh2. Steps to Reproduce\r\n1. Ensure that both iOS8 / iOS9 devices are:\r\n- Logged into the same iCloud account.\r\n- Connected to the same WiFi Network.\r\n- Bluetooth enabled.\r\n\r\n2. Create a classic mobile application.\r\n3. Apply the above test code to the app.js file.\r\n4. Run the app to both devices.\r\n5. Launch the app on the iOS9 device.\r\n6. Launch the app through Handoff on the iOS8 device either by:\r\n- Swiping up from the app icon present on the lock screen.\r\n- Double tapping the home button and selecting the app.\r\n\r\nh2. Actual Result\r\n\r\nApp crashes with no error.\r\n\r\nh2. Expected Result\r\n\r\nApp should handoff from the iOS9 device to the iOS8 device successfully.", "attachment": [], "flagged": false, "summary": "iOS: Handoff crashes from iOS9 to iOS8", "creator": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "environment": "iPhone 6S (9.3.3) Device & iPhone 6 Plus (8.3) Device\r\nMac OSX El Capitan 10.11.6\r\nTi SDK: 5.4.0.v20160804185318\r\nAppc Studio: 4.7.0.201607250649\r\nAppc NPM: 4.2.7\t\r\nApp CLI: 5.4.0-40\r\nXcode 7.3.1\r\nNode v4.4.7", "comment": { "comments": [ { "id": "392721", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Alright, I guess the following is causing the error:\r\n{code:objc}\r\n if( [userActivity.activityType isEqualToString:CSSearchableItemActionType]){\r\n if([userActivity userInfo] !=nil){\r\n [dict setObject:[[userActivity userInfo] objectForKey:CSSearchableItemActivityIdentifier] forKey:@\"searchableItemActivityIdentifier\"];\r\n }\r\n }\r\n\r\n{code}\r\nbecause {{isEqualToString:CSSearchableItemActionType}} is an iOS 9 API. That also explains, why it works from iOS 8 to iOS 9 but not the other way around. Will wrap it properly to be ignored on iOS < 9. Good catch!\r\n\r\nAdditional infos:\r\n- Caused by [this PR|https://github.com/appcelerator/titanium_mobile/pull/7081]\r\n- Inside the core since the 5.0.0 release\r\n- Adjusted the demo-code to log the second debug. That was causing the alert-warning, because the previous alert was already presented.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-09T10:12:36.000+0000", "updated": "2016-08-09T10:31:12.000+0000" }, { "id": "392722", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (master): https://github.com/appcelerator/titanium_mobile/pull/8201\r\nPR (6_0_X): https://github.com/appcelerator/titanium_mobile/pull/8202\r\n\r\nPlease do a full FT using an iOS 8 and iOS 9 QE-device, thanks!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-09T10:22:38.000+0000", "updated": "2016-08-09T10:22:38.000+0000" }, { "id": "393092", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR (5_5_X): https://github.com/appcelerator/titanium_mobile/pull/8223", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-14T10:20:33.000+0000", "updated": "2016-08-14T10:20:33.000+0000" }, { "id": "393319", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Verified as fixed, Handoff no longer crashes when switching from an iOS9 device to an iOS8 device.\r\n\r\nTested On:\r\niPhone 6S (9.3.4, 8.2) Device \r\nMac OSX El Capitan 10.11.6\r\nTi SDK: 5.5.0.v20160816120242\r\nAppc Studio: 4.7.0.201607250649\r\nAppc NPM: 4.2.7\t\r\nApp CLI: 6.0.0-25\r\nXcode 8.0 beta 6 (8S193k)\r\nNode v4.4.7\r\n\r\n*Closing ticket.*", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-08-16T20:26:41.000+0000", "updated": "2016-08-16T20:26:41.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }