{ "id": "173722", "key": "AC-6281", "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": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-06-06T09:07:37.000+0000", "created": "2019-06-05T11:14:29.000+0000", "labels": [ "ios" ], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2019-06-13T11:17:17.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 you try and open an app from a universal link while the app is in the background or not open, the app will open and then crash (black screen) with no errors in the log. It works in Ti 7.5.1.GA. Does not work with Ti 8.0.0.GA or Ti 8.0.1.GA.\r\n\r\nSteps to reproduce:\r\n\r\n1. Create a test project (make the project name com.picsafe.med to simulate my app):\r\n\r\n $ mkdir Temp\r\n $ cd Temp\r\n $ ti create \r\n $ alloy new\r\n\r\n2. in tiapp.xml add:\r\n\r\n```\r\n \r\n ...\r\n \r\n \r\n aps-environment\r\n production \r\n \r\n \r\n com.apple.developer.associated-domains\r\n \r\n applinks:my.picsafe.com\r\n webcredentials:my.picsafe.com\r\n \r\n \r\n    \r\n```\r\n\r\n3. And also add:\r\n```\r\n \r\n ...\r\n \r\n ...\r\n\t\r\n NSUserActivityTypes\r\n \r\n com.picsafe.med.universalLink\r\n \r\n \r\n \r\n UIBackgroundModes\r\n \r\n fetch\r\n remote-notification\r\n \r\n \r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\tCFBundleURLTypes\r\n \r\n \r\n CFBundleURLName\r\n com.picsafe.med\r\n CFBundleURLSchemes\r\n \r\n picsafe\r\n \r\n \r\n \r\n```\r\n\r\n4. Add the following in `app/controllers/index.js`:\r\n```\r\nTi.App.iOS.addEventListener(\"continueactivity\", function(e) {\r\n\r\n if (e.activityType === \"NSUserActivityTypeBrowsingWeb\") {\r\n console.log(\"PicSafe has been opened from a URL:\", e.webpageURL);\r\n }\r\n\r\n // console.log(\"continueactivity\", JSON.stringify(Ti.App.getArguments()));\r\n});\r\n\r\n$.win.addEventListener(\"open\", function() {\r\n console.log(\"PicSafe has been opened.\");\r\n});\r\n```\r\n\r\n5. Build the project\r\n\r\n $ ti build --platform ios --target simulator\r\n\r\n6. Put the app into the background.\r\n\r\n7. Run the following from the command line:\r\n\r\n $ xcrun simctl openurl booted \"https://my.picsafe.com/app\"\r\n\r\n8. The app will open and then go to a black screen.\r\n\r\n\r\nExpected result (and result on Ti 7.5.1.GA: The app opens and displays correctly.\r\n\r\nObserves result: The app opens then crashes (either back to the springboard, or shows a black screen).", "attachment": [], "flagged": false, "summary": "Universal links not working on Ti 8.0.x - crashes if app in background or is closed", "creator": { "name": "raefa", "key": "raefa", "displayName": "Raef Akehurst", "active": true, "timeZone": "Australia/Sydney" }, "subtasks": [], "reporter": { "name": "raefa", "key": "raefa", "displayName": "Raef Akehurst", "active": true, "timeZone": "Australia/Sydney" }, "environment": "Brand new project. Ti 8.0.1.GA. iOS 12.2.", "comment": { "comments": [ { "id": "448853", "author": { "name": "spyromus", "key": "spyromus", "displayName": "Aleksey Gureiev", "active": true, "timeZone": "Europe/Helsinki" }, "body": "The same happens to me too. Instead of the black screen it falls out into the springboard.", "updateAuthor": { "name": "spyromus", "key": "spyromus", "displayName": "Aleksey Gureiev", "active": true, "timeZone": "Europe/Helsinki" }, "created": "2019-06-05T11:24:13.000+0000", "updated": "2019-06-05T11:24:13.000+0000" }, { "id": "448858", "author": { "name": "rpl", "key": "rpl", "displayName": "roeland p", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "I just tested by launching my app from a \"spotlight\".activity which also triggers \"continueacitivity\" and the app also crashed upon resuming. ", "updateAuthor": { "name": "rpl", "key": "rpl", "displayName": "roeland p", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2019-06-05T14:22:56.000+0000", "updated": "2019-06-05T14:22:56.000+0000" }, { "id": "448866", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "Try to use 8_1_X (ti sdk install -b 8_1_X) which fixes this.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-06-05T18:05:39.000+0000", "updated": "2019-06-05T18:05:39.000+0000" }, { "id": "448874", "author": { "name": "raefa", "key": "raefa", "displayName": "Raef Akehurst", "active": true, "timeZone": "Australia/Sydney" }, "body": "8_1_X does fix it. Thanks. (Wish I had thought to try that 6 hours of testing earlier!!!)", "updateAuthor": { "name": "raefa", "key": "raefa", "displayName": "Raef Akehurst", "active": true, "timeZone": "Australia/Sydney" }, "created": "2019-06-05T21:15:30.000+0000", "updated": "2019-06-05T21:15:30.000+0000" }, { "id": "448890", "author": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~rpl] can you confirm it also is fixed for you with 8.1?", "updateAuthor": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-06-06T08:50:15.000+0000", "updated": "2019-06-06T08:50:15.000+0000" }, { "id": "448893", "author": { "name": "rpl", "key": "rpl", "displayName": "roeland p", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "yes fixed!", "updateAuthor": { "name": "rpl", "key": "rpl", "displayName": "roeland p", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2019-06-06T08:56:51.000+0000", "updated": "2019-06-06T08:56:51.000+0000" }, { "id": "448915", "author": { "name": "spyromus", "key": "spyromus", "displayName": "Aleksey Gureiev", "active": true, "timeZone": "Europe/Helsinki" }, "body": "This one is fixed for me too, but I discovered that the app still crashes when you try to open a file that is linked to the app from email. We are sending reports in email and the app is registered to handle them. When you click on the report the app crashes on Ti.App.getArguments() call with:\r\n\r\n```\r\n[ERROR] message = \"-[NSUserActivity boundBridge:withKrollObject:]: unrecognized selector sent to instance 0x281723cc0\";\r\n[ERROR] nativeStack = \"3 CoreFoundation 0x00000001cca1e7bc + 1412\\n4 CoreFoundation 0x00000001cca2046c _CF_forwarding_prep_0 + 92\\n5 TitaniumKit0x000000010262394c -[KrollBridge registerProxy:] + 148\\n6 TitaniumKit0x00000001026049e0 TiBindingTiValueFromProxy + 492\\n7 TitaniumKit0x0000000102603d08 TiBindingTiValueFromNSDictionary + 220\\n8 TitaniumKit0x0000000102603d08 TiBindingTiValueFromNSDictionary + 220\\n9 TitaniumKit0x000000010265bbec KrollCallAsFunction + 556\\n10 JavaScriptCore 0x00000001d3d92788 + 348\\n11 JavaScriptCore 0x00000001d4474eac + 352\\n12 JavaScriptCore 0x00000001d3d69a08 + 29992\\n13 JavaScriptCore 0x00000001d3d69a1c + 30012\\n14 JavaScriptCore 0x00000001d3d622e4 + 308\\n15 JavaScriptCore 0x00000001d43d15d4 + 424\\n16 JavaScriptCore 0x00000001d4588b78 _ZN3JSC12profiledCallEPNS_9ExecStateENS_15ProfilingReasonENS_7JSValueENS_8CallTypeERKNS_8CallDataES3_RKNS_7ArgListE + 188\\n17 JavaScriptCore 0x00000001d3d97cbc JSObjectCallAsFunction + 368\\n18 TitaniumKit0x0000000102639db0 TiBindingEventProcess + 680\\n19 TitaniumKit0x0000000102659cb8 -[KrollContext invoke:] + 116\\n20 TitaniumKit0x0000000102659d28 -[KrollContext enqueue:] + 92\\n21 TitaniumKit0x00000001026618bc TiBindingRunLoopEnqueue + 92\\n22 TitaniumKit0x0000000102660238 -[TiProxy fireEvent:withObject:withSource:propagate:reportSuccess:errorCode:message:] + 176\";\r\n```\r\n", "updateAuthor": { "name": "spyromus", "key": "spyromus", "displayName": "Aleksey Gureiev", "active": true, "timeZone": "Europe/Helsinki" }, "created": "2019-06-07T07:44:59.000+0000", "updated": "2019-06-07T07:44:59.000+0000" }, { "id": "449047", "author": { "name": "nipoul", "key": "nipoul", "displayName": "Nikos Poulios", "active": true, "timeZone": "Europe/Berlin" }, "body": "Could you point us to the commit that fixed that? What is the estimated release date of 8.1.0?", "updateAuthor": { "name": "nipoul", "key": "nipoul", "displayName": "Nikos Poulios", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-06-13T08:46:38.000+0000", "updated": "2019-06-13T08:46:38.000+0000" }, { "id": "449052", "author": { "name": "nipoul", "key": "nipoul", "displayName": "Nikos Poulios", "active": true, "timeZone": "Europe/Berlin" }, "body": "According to my tests with 8_1_X, app resumes when in background using universal links, but when the app is not running and is launched by universal link, I get the following error and app is stuck on splash screen\r\n\r\n{code:java}\r\ndefault\t13:48:16.024421 +0300\tBayerNet DEV\t[ERROR] Application received error: /AppController.js:404\r\n var launchArgs = Ti.App.getArguments();\r\n ^\r\n-[NSUserActivity boundBridge:withKrollObject:]: unrecognized selector sent to instance 0x280102c60\r\n at [native code]\r\n at getLaunchArgumentsURL@/core/js/controllers/AppController.js:404:41)\r\n at showInterface@/core/js/controllers/AppController.js:338:36)\r\n at start@/core/js/controllers/AppController.js:184:20)\r\n at /app.js:1:171)\r\n at global code@/app.js:2:70)\r\n at require@[native code]\r\n at /ti.main.js:9535:10)\r\n at loadAsync@/ti.main.js:9461:13)\r\n at global code@/ti.main.js:9532:10)\r\n\r\nTitaniumKit 0x00000001012014c0 -[KrollBridge loadCommonJSModule:withSourceURL:] + 472\r\nTitaniumKit 0x0000000101201e2c -[KrollBridge loadJavascriptText:fromFile:withContext:] + 84\r\nTitaniumKit 0x0000000101203358 -[KrollBridge require:path:] + 428\r\nTitaniumKit 0x00000001012398f8 CommonJSRequireCallback + 120\r\nJavaScriptCore 0x00000001d798faa4 + 348\r\nJa<…>\r\n\r\nand\r\n\r\n[ERROR] Application received error: /ti.main.js:9535\r\n require('./app'); // This event is to be fired after \"app.js\" execution. Reasons:\r\n ^\r\nModule \"app.js\" failed to leave a valid exports object\r\n at require@[native code]\r\n at /ti.main.js:9535:10)\r\n at loadAsync@/ti.main.js:9461:13)\r\n at global code@/ti.main.js:9532:10)\r\n\r\nTitaniumKit 0x00000001011ff95c -[KrollBridge evalFileOnThread:context:] + 884\r\nTitaniumKit 0x00000001012382f0 -[KrollInvocation invoke:] + 88\r\nTitaniumKit 0x0000000101238f94 -[KrollContext invoke:] + 116\r\nTitaniumKit 0x00000001012008c8 -[KrollBridge didStartNewContext:] + 2816\r\nTitaniumKit 0x0000000101239840 -[KrollContext main] + 1160\r\nlibdispatch.dylib 0x00000001d007ca38 + 24\r\nlibdispatch.dylib 0x00000001d007d7d4 + 16\r\nlibdispatch.dylib 0x00000001d002b004 + 1068\r\nCoreFoundation 0x00000001d05cec1c + 12\r\nCoreFoundation 0x00000001d05c9b54 + 1924\r\nCoreFoundation 0x00000001d05c90b0 CFRunLoopRunSpecific + 436\r\nGraphicsServices <…>\r\n{code}", "updateAuthor": { "name": "nipoul", "key": "nipoul", "displayName": "Nikos Poulios", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-06-13T10:52:52.000+0000", "updated": "2019-06-13T10:52:52.000+0000" }, { "id": "449053", "author": { "name": "nipoul", "key": "nipoul", "displayName": "Nikos Poulios", "active": true, "timeZone": "Europe/Berlin" }, "body": "OK for the last part I figured out I should listen for continueactivity event and not use getArguments", "updateAuthor": { "name": "nipoul", "key": "nipoul", "displayName": "Nikos Poulios", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-06-13T11:17:17.000+0000", "updated": "2019-06-13T11:17:17.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }