{ "id": "174052", "key": "TIMOB-27354", "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": "20884", "name": "Release 8.2.1", "archived": false, "released": true, "releaseDate": "2019-10-25" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2019-10-09T13:54:09.000+0000", "created": "2019-08-23T13:25:46.000+0000", "epic": { "id": 173691, "key": "TIMOB-27114", "name": "Support iOS 13", "summary": "iOS: Support iOS 13 and Xcode 11", "color": { "key": "color_3" }, "done": false }, "priority": { "name": "Critical", "id": "1" }, "labels": [ "engSchedule", "ios" ], "versions": [ { "id": "20412", "name": "Release 8.1.0", "archived": false, "released": true, "releaseDate": "2019-08-13" } ], "issuelinks": [], "assignee": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2019-10-30T02:35:46.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": "It seems that Ti.App.getArguments().url is undefined when you open an already-opened app using an URL-scheme in iOS 13.\r\n\r\nIn attachment, there is a sample project that runs as expected on iOS 12 but is broken on iOS 13 beta.\r\n\r\nThere are two apps, app A and app B. When you open app A and press on the button to open app B, you’ll see the alert containing the URL-scheme that was used to open app B. When you try to go back to app A using URL-scheme, after resuming in app A the Ti.App.getArguments().url returns the URL-scheme that was used to open app A in iOS 12. In iOS 13, navigating from app B to app A will return undefined for Ti.App.getArguments().url ", "attachment": [ { "id": "66878", "filename": "FirstApp.zip", "author": { "name": "jvos", "key": "jvos", "displayName": "Joren Vos", "active": true, "timeZone": "Europe/Brussels" }, "created": "2019-08-23T13:27:20.000+0000", "size": 8661363, "mimeType": "application/zip" }, { "id": "66877", "filename": "ios12-working.MP4", "author": { "name": "jvos", "key": "jvos", "displayName": "Joren Vos", "active": true, "timeZone": "Europe/Brussels" }, "created": "2019-08-23T13:26:02.000+0000", "size": 2563712, "mimeType": "video/mp4" }, { "id": "66876", "filename": "ios13-broken.MP4", "author": { "name": "jvos", "key": "jvos", "displayName": "Joren Vos", "active": true, "timeZone": "Europe/Brussels" }, "created": "2019-08-23T13:26:07.000+0000", "size": 3581543, "mimeType": "video/mp4" }, { "id": "66879", "filename": "SecondApp.zip", "author": { "name": "jvos", "key": "jvos", "displayName": "Joren Vos", "active": true, "timeZone": "Europe/Brussels" }, "created": "2019-08-23T13:27:25.000+0000", "size": 8661416, "mimeType": "application/zip" } ], "flagged": false, "summary": "iOS13 - Ti.App.getArguments().url undefined when resuming", "creator": { "name": "jvos", "key": "jvos", "displayName": "Joren Vos", "active": true, "timeZone": "Europe/Brussels" }, "subtasks": [], "reporter": { "name": "jvos", "key": "jvos", "displayName": "Joren Vos", "active": true, "timeZone": "Europe/Brussels" }, "environment": null, "comment": { "comments": [ { "id": "450773", "author": { "name": "bhouse", "key": "bhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "body": "[~cwilliams] FYI ", "updateAuthor": { "name": "bhouse", "key": "bhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "created": "2019-08-23T13:56:49.000+0000", "updated": "2019-08-23T13:56:49.000+0000" }, { "id": "450812", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "tl;dr: The SDK needs to properly guard the \"source\" parameter before returning improper values, but most cases are not affected by that.\r\n\r\nWe see a related issue where our Swift extension crashes because the {{openURL:}} delegate method returns improper values to the underlaying API's, causing these issues. It can also be seen in a crash when logging in with Ti.Facebook where the app crashes because the {{sourceApplication}} param of the bubbled delegate method is {{nil}}.\r\n\r\n*EDIT*: The {{source}} is also undefined with iOS 13, which is native behavior: https://forums.developer.apple.com/thread/119118\r\n\r\n*EDIT 2*: For your issue, you can easily resolve it by using the {{handleurl}} event in {{Ti.App.iOS}} which is generally more stable than {{resumed}}.\r\n\r\n[~jvos] This fixes your issue (which is not Titanium related in that case):\r\n{code:js}\r\nTi.App.iOS.addEventListener('handleurl', event => {\r\n setTimeout(() => {\r\n alert(JSON.stringify(event));\r\n }, 1000);\r\n});\r\n\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: '#fff'\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\nOur issue is related to Ti.GoogleSignIn, but the actual issue is an SDK issue where the (nil) source is returned as a {{NSNull}} type, causing some SDK's to handle it improperly, since it's either nil or a string, nut not {{NSNull}}, so the SDK should be updated to handle it properly.", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-08-25T21:02:42.000+0000", "updated": "2019-08-26T14:31:16.000+0000" }, { "id": "451592", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "1. While debugging I found that - \r\nSequence of calling following delegate methods has changed -\r\n Function1 - [-(void)applicationWillEnterForeground:(UIApplication *)application|https://github.com/appcelerator/titanium_mobile/blob/c6978221163cb9a628859b39042fa697b6065471/iphone/TitaniumKit/TitaniumKit/Sources/API/TiApp.m#L1086]\r\n Function2 - [- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options|https://github.com/appcelerator/titanium_mobile/blob/c6978221163cb9a628859b39042fa697b6065471/iphone/TitaniumKit/TitaniumKit/Sources/API/TiApp.m#L426]\r\n\r\n \r\nIn iOS 12, Function1 is called before Function2. In iOS 13 Function2 is called before Function1.\r\n\r\nInside Function1 [url|https://github.com/appcelerator/titanium_mobile/blob/c6978221163cb9a628859b39042fa697b6065471/iphone/TitaniumKit/TitaniumKit/Sources/API/TiApp.m#L1096] key is removed.\r\n\r\nSo to avoid issue related Ti.App.getArguments().url being undefined use \"handleurl\" event as mentioned by Hans.\r\n\r\n2. Regarding \"source\" property NSNull is set [here|https://github.com/appcelerator/titanium_mobile/blob/c6978221163cb9a628859b39042fa697b6065471/iphone/TitaniumKit/TitaniumKit/Sources/API/TiApp.m#L435] if it is nil. I don't think we should set NSNull for this. I'll put a guard and will not set \"source\" if it nil.", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-09-23T22:35:25.000+0000", "updated": "2019-09-23T22:35:25.000+0000" }, { "id": "451629", "author": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR (master) - https://github.com/appcelerator/titanium_mobile/pull/11242\r\nPR (8_2_X) - https://github.com/appcelerator/titanium_mobile/pull/11243", "updateAuthor": { "name": "vijaysingh", "key": "vijaysingh", "displayName": "Vijay Singh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-09-25T21:13:58.000+0000", "updated": "2019-09-25T21:13:58.000+0000" }, { "id": "451762", "author": { "name": "eboateng", "key": "eboateng", "displayName": "Ebenezer Boateng", "active": true, "timeZone": "America/Los_Angeles" }, "body": "FR Failed - Information in PR (8_2_X)", "updateAuthor": { "name": "eboateng", "key": "eboateng", "displayName": "Ebenezer Boateng", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-10-02T15:00:41.000+0000", "updated": "2019-10-02T15:00:41.000+0000" }, { "id": "451763", "author": { "name": "ssaddique", "key": "ssaddique", "displayName": "Sohail Saddique", "active": true, "timeZone": "Europe/London" }, "body": "FR Failed (PR Master)\r\n\r\nInformation in PR: https://github.com/appcelerator/titanium_mobile/pull/11242#issuecomment-537533063", "updateAuthor": { "name": "ssaddique", "key": "ssaddique", "displayName": "Sohail Saddique", "active": true, "timeZone": "Europe/London" }, "created": "2019-10-02T15:00:53.000+0000", "updated": "2019-10-02T15:00:53.000+0000" }, { "id": "451799", "author": { "name": "ssaddique", "key": "ssaddique", "displayName": "Sohail Saddique", "active": true, "timeZone": "Europe/London" }, "body": "Changes that have been made alleviate the bug. FR Passed. ", "updateAuthor": { "name": "ssaddique", "key": "ssaddique", "displayName": "Sohail Saddique", "active": true, "timeZone": "Europe/London" }, "created": "2019-10-03T09:33:07.000+0000", "updated": "2019-10-03T09:33:07.000+0000" }, { "id": "451815", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "merged to master and 8_2_X", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2019-10-03T14:54:05.000+0000", "updated": "2019-10-03T14:54:05.000+0000" }, { "id": "451922", "author": { "name": "ssaddique", "key": "ssaddique", "displayName": "Sohail Saddique", "active": true, "timeZone": "Europe/London" }, "body": "Verified using builds:\r\n\r\n8.2.1.v20191008121020\r\n8.3.0.v20191008081818\r\n\r\nTicket closed.\r\n\r\n", "updateAuthor": { "name": "ssaddique", "key": "ssaddique", "displayName": "Sohail Saddique", "active": true, "timeZone": "Europe/London" }, "created": "2019-10-09T13:54:00.000+0000", "updated": "2019-10-09T13:54:00.000+0000" }, { "id": "452097", "author": { "name": "Pietro", "key": "pietro", "displayName": "Pietro Granati", "active": true, "timeZone": "Europe/Rome" }, "body": "For me is undefined with 8.2.1.v20191010112656", "updateAuthor": { "name": "Pietro", "key": "pietro", "displayName": "Pietro Granati", "active": true, "timeZone": "Europe/Rome" }, "created": "2019-10-16T12:47:22.000+0000", "updated": "2019-10-16T12:47:22.000+0000" }, { "id": "452296", "author": { "name": "xalfeiran", "key": "xalfeiran", "displayName": "Xavier Alfeiran", "active": true, "timeZone": "America/Cancun" }, "body": "Undefined also with 8.2.1, with iOS 13.1.3", "updateAuthor": { "name": "xalfeiran", "key": "xalfeiran", "displayName": "Xavier Alfeiran", "active": true, "timeZone": "America/Cancun" }, "created": "2019-10-28T17:32:45.000+0000", "updated": "2019-10-28T17:32:45.000+0000" }, { "id": "452328", "author": { "name": "Pietro", "key": "pietro", "displayName": "Pietro Granati", "active": true, "timeZone": "Europe/Rome" }, "body": "@Xavier Alfeiran\r\nI solved using handle url event:\r\n\r\n{code:java}\r\nTi.App.iOS.addEventListener(\"handleurl\", function() {\r\n\t\tif (!_.isUndefined(Ti.App.getArguments().url)) {\r\n\t\t\tTi.API.info(\"RESUME URLSCHEME: \" + Ti.App.getArguments().url);\r\n\t\t\tvar url = Ti.App.getArguments().url;\r\n\t\t\tvar ods = url.substring((\"scheme://\").length, url.length);\r\n\t\t\tif (!Alloy.Globals.itinerarioAperto) {\r\n\t\t\t\tgetODS(ods);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n{code}\r\n\r\n", "updateAuthor": { "name": "Pietro", "key": "pietro", "displayName": "Pietro Granati", "active": true, "timeZone": "Europe/Rome" }, "created": "2019-10-29T10:13:27.000+0000", "updated": "2019-10-29T10:13:27.000+0000" }, { "id": "452356", "author": { "name": "xalfeiran", "key": "xalfeiran", "displayName": "Xavier Alfeiran", "active": true, "timeZone": "America/Cancun" }, "body": "it worked nice, thank you", "updateAuthor": { "name": "xalfeiran", "key": "xalfeiran", "displayName": "Xavier Alfeiran", "active": true, "timeZone": "America/Cancun" }, "created": "2019-10-30T02:35:46.000+0000", "updated": "2019-10-30T02:35:46.000+0000" } ], "maxResults": 15, "total": 15, "startAt": 0 } } }