{ "id": "154221", "key": "TIMOB-20220", "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": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-04-01T20:16:30.000+0000", "created": "2016-01-11T22:03:14.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "qe-5.4.0" ], "versions": [ { "id": "17532", "name": "Release 5.1.1", "archived": false, "released": true, "releaseDate": "2015-11-24" } ], "issuelinks": [ { "id": "52250", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "161924", "key": "AC-4125", "fields": { "summary": "Ti.App.iOS 'continueactivity' event is not fired on distribution build", "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" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } }, { "id": "52339", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "162468", "key": "TIMOB-23747", "fields": { "summary": "iOS: Handoff crashes from iOS9 to iOS8", "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-08T21:45:48.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": "h6.Issue Description\r\nIn a manner similar to Handoff (https://wiki.appcelerator.org/display/guides2/Handoff+User+Activities), using the Ti.App.iOS.UserActivity API to implement Universal Links in an app. This was to connect my website with the app. Basically this was to allow Safari users to open thea app via a link on the website. \r\n\r\nIn the app there is following event handler: \r\n{code}\r\nTi.App.iOS.addEventListener('continueactivity', function(e){ \r\n if (e.activityType === 'NSUserActivityTypeBrowsingWeb') { \r\n var url = e.webpageURL; \r\n // Display relevant content \r\n } \r\n}); \r\n{code}\r\n\r\nThis would listen for the continueactivity event to be fired by iOS and capture the URL from the UserActivity in the function parameters. Then it would display relevant content based on the URL. \r\n\r\nThis all worked fine on SDK 5.0.2. But after switching to SDK 5.1.1 it seems as though the 'continueactivity' event is never being fired.\r\n\r\n", "attachment": [], "flagged": false, "summary": "iOS: Ti.App.iOS.continueactivity not being fired", "creator": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Xcode 7.2\r\nTitanium SDK 5.1.1GA \r\niOS 9.1", "closedSprints": [ { "id": 614, "state": "closed", "name": "2016 Sprint 07 SDK", "startDate": "2016-03-26T00:38:56.432Z", "endDate": "2016-04-09T00:38:00.000Z", "completeDate": "2016-04-11T04:41:08.231Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "375534", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~rramirez] Can you please provide a more detailed example code to trigger the event? One app.js including a test case would be great!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-01-30T23:38:08.000+0000", "updated": "2016-01-30T23:49:17.000+0000" }, { "id": "378084", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Can you validate the issue using the following code:\r\n{code:javascript}\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\nif(!activity.isSupported()){\r\n alert('activity is not supported');\r\n} else {\r\n activity.becomeCurrent();\r\n}\r\n\r\nactivity.addEventListener('useractivitywascontinued', function(e) {\r\n Ti.API.info('Activity moved to a different device.');\r\n});\r\n\r\nTi.App.iOS.addEventListener('continueactivity', function(e){\r\n if (e.activityType === 'com.foo.message' && e.userInfo.msg) {\r\n alert(e.userInfo.msg);\r\n }\r\n});\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}", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-02-28T19:15:04.000+0000", "updated": "2016-02-28T19:15:04.000+0000" }, { "id": "378156", "author": { "name": "adipa", "key": "adipa", "displayName": "Adipa Wijayathilaka", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello, tried the example code (https://gist.github.com/boarnoah/2e4a0970610b3cd46f1a)\r\nThe following is the console output:\r\nCreating activity...\r\nActivity is supported...\r\n\r\ncontinueactivity didn't seem to fire\r\nThis was on ios 9.1, Ti SDK 5.2-5.1.x. Xcode 7.2 (same place as the salesforce ticket). \r\nI've attached the example app used (http://www.mediafire.com/download/t2rq265ks3t5cuw/FooBar_1.zip)", "updateAuthor": { "name": "adipa", "key": "adipa", "displayName": "Adipa Wijayathilaka", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-02-29T15:35:49.000+0000", "updated": "2016-02-29T15:37:36.000+0000" }, { "id": "379177", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~adipa] Did the example work with 5.0.2? Trying to test it.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-03-08T15:28:49.000+0000", "updated": "2016-03-08T15:28:49.000+0000" }, { "id": "379210", "author": { "name": "adipa", "key": "adipa", "displayName": "Adipa Wijayathilaka", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@hansknoechel had to [reinstall|https://medium.com/all-titanium/reinstalling-appcelerator-titanium-on-mac-from-scratch-9a2bb6b9b629#.3yp9lwj3o] my AppC Studio, was having node issues when building to 5.0.2.\r\n\r\nAlso had to replace:\r\n\r\n{code:javascript}\r\nif(!activity.isSupported()){\r\n alert('activity is not supported');\r\n} else {\r\n activity.becomeCurrent();\r\n}\r\n{code}\r\n\r\nwith:\r\n{code:javascript}\r\nactivity.becomeCurrent();\r\n{code}\r\n\r\n\r\n.isSupported wasn't defined in 5.0.2\r\nContinue activity still didn't fire from what I can see. ", "updateAuthor": { "name": "adipa", "key": "adipa", "displayName": "Adipa Wijayathilaka", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-08T16:53:20.000+0000", "updated": "2016-03-08T16:53:20.000+0000" }, { "id": "379440", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "If my provided test case doesn't work, I need a test case that works anyway. As soon as I have that, I can debug and track-down the issue. Thanks guys!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-03-10T11:27:38.000+0000", "updated": "2016-03-10T11:27:38.000+0000" }, { "id": "380457", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Does anyone know the status of this bug? I can't get continueactivity to fire on universal links.", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-23T02:18:57.000+0000", "updated": "2016-03-23T02:18:57.000+0000" }, { "id": "380458", "author": { "name": "adipa", "key": "adipa", "displayName": "Adipa Wijayathilaka", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~dfoxinator] we've been able to create a working example of continue activity on 5.0.2 on one of our private servers. Will be updating the salesforce ticket tomorrow to let appcelerator test it out on their end which should hopefully bump up this jira ticket as well.", "updateAuthor": { "name": "adipa", "key": "adipa", "displayName": "Adipa Wijayathilaka", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-23T02:24:07.000+0000", "updated": "2016-03-23T02:24:07.000+0000" }, { "id": "380459", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "@adipa thank you for the information, I appreciate it. That is good news. This seems like very important functionality that has been broken for quite some time now.", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-23T02:29:48.000+0000", "updated": "2016-03-23T02:29:48.000+0000" }, { "id": "381001", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Checking in on this again. Does anyone have any kind of workaround?\r\n\r\nI have trouble believing more people aren't running into this so I'm wondering if I'm missing something here. But this more or less renders it impossible to link to content in an app if you don't know whether the user has the app installed or not.", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-30T04:14:28.000+0000", "updated": "2016-03-30T04:14:28.000+0000" }, { "id": "381063", "author": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I don't think you're missing anything. We're eagerly awaiting a fix.", "updateAuthor": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-30T18:16:44.000+0000", "updated": "2016-03-30T18:16:44.000+0000" }, { "id": "381064", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Damn. I'm guessing maybe you're in the same boat - but it should be noted that there used to be a semi-workaround for this bug in that you could use hacks on the web side in combination with URL schemes to produce very similar behavior to universal links. However, this functionality was removed/rendered unusable in an iOS 9.x release making universal links the only way to accomplish what used to be do-able with just a url scheme.", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-30T18:21:04.000+0000", "updated": "2016-03-30T18:21:04.000+0000" }, { "id": "381068", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hey guys,\r\n\r\nas said before, I need to have a demo code that worked in 5.0.2 and doesn't work on 5.1.x and above. As soon as I have that, the bugfix should be schedulable.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-03-30T18:49:04.000+0000", "updated": "2016-03-30T18:49:04.000+0000" }, { "id": "381070", "author": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Okay, so what [~adipa] provided isn't working/sufficient?", "updateAuthor": { "name": "athorne", "key": "athorne", "displayName": "Alex Bernier", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-30T19:01:55.000+0000", "updated": "2016-03-30T19:01:55.000+0000" }, { "id": "381071", "author": { "name": "adipa", "key": "adipa", "displayName": "Adipa Wijayathilaka", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello [~hansknoechel] we did manage to show a working demo on 5.0.2 that doesn't work on 5.1.x+ to Mr Ricardo Ramirez last week (in connection with the salesforce ticket). \r\nI'll ask him to forward you the details. ", "updateAuthor": { "name": "adipa", "key": "adipa", "displayName": "Adipa Wijayathilaka", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-30T19:02:36.000+0000", "updated": "2016-03-30T19:02:36.000+0000" }, { "id": "381072", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I can provide the demo and the steps to replicate at 8 PM pacific time ", "updateAuthor": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-30T19:04:02.000+0000", "updated": "2016-03-30T19:04:02.000+0000" }, { "id": "381076", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Alright, I have been able to test it using the below code:\r\n{code:javascript}\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 alert(e.userInfo.msg);\r\n }\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\nand the following inside the tiapp.xml:\r\n{code:xml}\r\n\r\n \r\n \r\n NSUserActivityTypes\r\n \r\n\t\tcom.foo.message\r\n\t\tcom.foo.bar\r\n\t \r\n \r\n \r\n\r\n{code}\r\n\r\nand it worked with both 5.0.2 and 5.2.x. It might work because I'm testing it from our titanium_mobile Xcode project inside the repository. That project as all precompile-macros defined, so I'm 90 % sure we missed some macro in 5.1.x that causes parts of the code not to be executed correctly. Leave me some time and I will investigate asap!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-03-30T19:31:12.000+0000", "updated": "2016-03-30T19:31:12.000+0000" }, { "id": "381077", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Did you try using a https server ? \r\n", "updateAuthor": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-30T19:32:52.000+0000", "updated": "2016-03-30T19:32:52.000+0000" }, { "id": "381079", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks Hans, it's much appreciated. Please let me know if there's anything I can provide that would help.\r\n\r\nNot sure if it means anything Ricardo, but I only tested using an https link too and couldn't get that to work, so maybe that means something but not sure.", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-30T19:37:02.000+0000", "updated": "2016-03-30T19:37:02.000+0000" }, { "id": "381087", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Would should it change? Please re-validate with 5.2.0.GA and the above demo provided. It works well for me in any tested cases. Also try running it with {{true}} inside the section ( not ) to see possible differences.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-03-30T19:51:17.000+0000", "updated": "2016-03-30T19:51:17.000+0000" }, { "id": "381120", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This is very weird... I just ran my code that didn't work a week ago and uses a universal link and a continueactivity listener and it seemed to work on 5.2.1 GA and 5.2.0 and 5.1.2. Needless to say, I'm a little baffled right now. I'm wondering if this issue has/had something to do with iOS and maybe was fixed or something.\r\n\r\nCan anyone else who had this issue while using universal links try it and get it to work now? I feel like I'm going crazy.", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-30T23:52:34.000+0000", "updated": "2016-03-30T23:52:34.000+0000" }, { "id": "381126", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Some more information - I've been testing more and I'm only able to get the continueactivity listener to fire in one scenario - when the app is run with LiveView turned on in Appcelerator Studio. When I run the same project in Run mode with LiveView disabled, continueactivity never gets fired when I tap a universal link (it does open the app, but doesn't fire the listener). I'm not sure what this means.", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-31T00:59:05.000+0000", "updated": "2016-03-31T00:59:18.000+0000" }, { "id": "381135", "author": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Here is a more detailed guide about how to replicate this: \r\n\r\n# Create a new Titanium Alloy App \r\n# Open the controllers/index.js file\r\n# paste the next event handler: \r\n{code}\r\nTi.App.iOS.addEventListener('continueactivity', function(e){ \r\n if (e.activityType === 'NSUserActivityTypeBrowsingWeb') { \r\n var url = e.webpageURL; \r\n Ti.API.info(url);\r\n } \r\n}); \r\n{code}\r\n# Go to apple developer console \r\n# Create a new app id \r\n# Enable associated domains\r\n# Use the Id you created in the alloy project \r\n# Go to the provisioning profiles \r\n# Create a new provisioning profile with the created app id\r\n# Download and install the profile\r\n# Create a new Entitlements.plist file with the next info:\r\n{code}\r\n\r\n\r\n\r\n\r\n\tget-task-allow\r\n\t\r\n\tcom.apple.developer.associated-domains\r\n\t\r\n\t\tapplinks:PLACEHEREYOURHTTPSDOMAIN\r\n\t\t\r\n\taps-environment\r\n\tdevelopment\r\n\tapplication-identifier\r\n\tPLACEHEREYOURAPPIDNUMBER.PLACEHEREYOURAPPID\r\n\tkeychain-access-groups\r\n\t\r\n\t\tPLACEHEREYOURAPPIDNUMBER.PLACEHEREYOURAPPID\r\n\t\r\n\r\n\r\n{code}\r\n# Place the Entitlements.plist file in the root of your Titanium project\r\n# Create a new apple-app-site-association file with the next content\r\n{code}\r\n{\r\n \"applinks\": {\r\n \"apps\": [],\r\n \"details\": [\r\n {\r\n \"appID\": \"PLACEHEREYOURHTTPSDOMAIN\",\r\n \"paths\": [ \"*\" ]\r\n }\r\n ]\r\n }\r\n}\r\n{code}\r\n# Save it as apple-app-site-association with no extension \r\n# Place the file in the root of your https server\r\n# Run The app on device using the created provisioning profile \r\n# After run open safari in your app and go to your server \r\n# You should see a banner in the web page, click open \r\n# The app should be opened and the info message showed\r\n\r\n\r\n", "updateAuthor": { "name": "rramirez", "key": "rramirez", "displayName": " Ricardo Ramirez", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-31T03:39:40.000+0000", "updated": "2016-03-31T03:39:40.000+0000" }, { "id": "381136", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Ricardo, that's a great list of steps. I have my app set up pretty much exactly the same way.\r\n\r\nI'm curious, if you do a clean install of your app with LiveView turned on, does continueactivity get fired? I'm able to consistently get it to fire ONLY when I have LiveView enabled.", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-31T03:45:54.000+0000", "updated": "2016-03-31T03:45:54.000+0000" }, { "id": "381145", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~rramirez] I'm very sure you code does not work because of the above described scenario: The Event can only be fired if you have at least one \"Ti.App.iOS.createUserActivity()\" (see here: https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiApp.m#L976). That's why my above example worked and yours didn't. That was introduced by me for the 5.2.0.GA release because I thought nobody would use the event without at least using \"createUserActivity\" at least once.\r\n\r\nSo long story short: If my code works, that's exactly what's going on. And: If you have a use case where you would need the event without being able to create an activity, let me know and I update the compile-condition. Thanks guys!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-03-31T06:38:33.000+0000", "updated": "2016-03-31T06:38:33.000+0000" }, { "id": "381152", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/7897", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-03-31T08:25:33.000+0000", "updated": "2016-03-31T08:25:33.000+0000" }, { "id": "381179", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Thanks Hans, this definitely has something to do with the issue. I threw your PR changes in, and it almost works entirely as expected (even when not in LiveView).\r\n\r\nIf the app is running in the background, then it works fine and the handler is called properly.\r\n\r\nHowever, if the app is closed, and a universal link is tapped, the app opens and the following error occurs, crashing the app:\r\n\r\n{noformat}\r\n[ERROR] : The application has crashed with an uncaught exception 'NSInvalidArgumentException'.\r\n[ERROR] : Reason:\r\n[ERROR] : -[NSUserActivity unboundBridge:]: unrecognized selector sent to instance 0x14763c580\r\n[ERROR] : Stack trace:\r\n[ERROR] : \r\n[ERROR] : 0 CoreFoundation 0x0000000181c92e38 + 124\r\n[ERROR] : 1 libobjc.A.dylib 0x00000001812f7f80 objc_exception_throw + 56\r\n[ERROR] : 2 CoreFoundation 0x0000000181c99ccc + 0\r\n[ERROR] : 3 CoreFoundation 0x0000000181c96c74 + 872\r\n[ERROR] : 4 CoreFoundation 0x0000000181b94d1c _CF_forwarding_prep_0 + 92\r\n[ERROR] : 5 myapp 0x00000001000a0200 myapp + 98816\r\n[ERROR] : 6 myapp 0x00000001000ad120 myapp + 151840\r\n[ERROR] : 7 myapp 0x000000010036a2e4 myapp + 3023588\r\n[ERROR] : 8 myapp 0x00000001004ffab0 myapp + 4684464\r\n[ERROR] : 9 myapp 0x00000001005018f0 myapp + 4692208\r\n[ERROR] : 10 myapp 0x00000001004169bc myapp + 3729852\r\n[ERROR] : 11 myapp 0x0000000100418e78 myapp + 3739256\r\n[ERROR] : 12 myapp 0x0000000100417ab8 myapp + 3734200\r\n[ERROR] : 13 myapp 0x0000000100318084 myapp + 2687108\r\n[ERROR] : 14 myapp 0x0000000100317d28 myapp + 2686248\r\n[ERROR] : 15 myapp 0x0000000100368c10 myapp + 3017744\r\n[ERROR] : 16 myapp 0x00000001000a6728 myapp + 124712\r\n[ERROR] : 17 myapp 0x00000001000a7568 myapp + 128360\r\n[ERROR] : 18 Foundation 0x0000000182667e1c + 1000\r\n[ERROR] : 19 libsystem_pthread.dylib 0x00000001818f7b28 + 156\r\n[ERROR] : 20 libsystem_pthread.dylib 0x00000001818f7a8c + 0\r\n[ERROR] : 21 libsystem_pthread.dylib 0x00000001818f5028 thread_start + 4\r\n[ERROR] : *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSUserActivity unboundBridge:]: unrecognized selector sent to instance 0x14763c580'\r\n[ERROR] : *** First throw call stack:\r\n[ERROR] : (0x181c92e38 0x1812f7f80 0x181c99ccc 0x181c96c74 0x181b94d1c 0x1000a0200 0x1000ad120 0x10036a2e4 0x1004ffab0 0x1005018f0 0x1004169bc 0x100418e78 0x100417ab8 0x100318084 0x100317d28 0x100368c10 0x1000a6728 0x1000a7568 0x182667e1c 0x1818f7b28 0x1818f7a8c 0x1818f5028)\r\n{noformat}", "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-31T13:55:57.000+0000", "updated": "2016-03-31T13:56:35.000+0000" }, { "id": "381180", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~dfoxinator] Can you show me how you create the universal link? Want to see if we might miss another #ifdef statement. Thanks! P.S.: Feel free to write me on Ti.Slack over the next 2 hours so we can troubleshoot it together.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-03-31T14:06:36.000+0000", "updated": "2016-03-31T14:06:36.000+0000" }, { "id": "381236", "author": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "dfoxinator", "key": "dfoxinator", "displayName": "David Fox", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-03-31T21:24:32.000+0000", "updated": "2016-03-31T21:24:32.000+0000" }, { "id": "392468", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "Tested the fix with the demo code provided by [~hansknoechel] and found an issue. \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\nTested On:\r\niPhone 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.v20160802165655\r\nAppc Studio: 4.7.0.201607250649\r\nAppc NPM: 4.2.7\t\r\nApp CLI: 5.4.0-37\r\nXcode 7.3\r\nNode v4.4.7", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-08-04T22:32:27.000+0000", "updated": "2016-08-04T22:33:45.000+0000" }, { "id": "392489", "author": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "cng", "key": "cng", "displayName": "Chee Kiat Ng", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-08-05T04:14:21.000+0000", "updated": "2016-08-05T04:14:21.000+0000" }, { "id": "392500", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "So, the \"error\" {{UIAlertController is up and showing an alert. ABORTING showing of modal controller}} is only shown, because an alert was already presented so the next one was aborted in the queue automatically. Why it doesn't work from iOS 9 to iOS 8 but from iOS 8 to iOS 9: Sick! I would love to have more logs on that, so I can debug it in Xcode. Thanks man!", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-08-05T13:43:50.000+0000", "updated": "2016-08-05T13:43:50.000+0000" }, { "id": "392564", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "[~hansknoechel] in regards to the app crash from iOS9 to iOS8, no error logs are returned in the studio console, so what I provided above was the iOS8 device's logs from Xcode.\r\n\r\n*Edit:* Ran the app through CLI with DEBUG=*, here is the complete log of the iOS8 device when attempting to handoff from iOS9:\r\n{code:java}\r\n[INFO] SOASTA TouchTest Build : 8244.160\r\n[INFO] SOASTA TouchTest initializing...\r\n[INFO] Process delegate TiApp(o) : TiHost : NSObject\r\n[INFO] added ctDidFinishLaunchingWithOptions\r\n[INFO] watching application:didFinishLaunchingWithOptions: : success\r\n[INFO] added ctOpenURL\r\n[INFO] watching openURL : success\r\n[INFO] SOASTA TouchTest initialized in 92 msec (#51)\r\n[INFO] assertion failed: 12D508: libxpc.dylib + 71792 [3C982BC2-5B46-305A-9A09-3C3D15332820]: 0x7d\r\n[DEBUG] Reading stylesheet from: /private/var/mobile/Containers/Bundle/Application/6BE24824-4B19-4501-9105-C2AAD2348AE0/SamusTheBold.app/stylesheet.plist\r\n[INFO] SamusTheBold/1.0 (5.4.0.16921ce)\r\n{code}\r\n\r\nThere doesn't seem to be any explicit errors here (also seen in Studio logs), but it may help you diagnose the problem.\r\n", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-08-05T23:37:24.000+0000", "updated": "2016-08-05T23:52:47.000+0000" }, { "id": "392675", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-08-08T21:45:35.000+0000", "updated": "2016-08-08T21:45:35.000+0000" } ], "maxResults": 36, "total": 36, "startAt": 0 } } }