{ "id": "119017", "key": "TIMOB-14966", "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": [], "resolution": null, "resolutiondate": null, "created": "2013-08-26T09:53:56.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:59.000+0000", "status": { "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", "name": "Reopened", "id": "4", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Current code only gets URL and \"handleOpenURL\" is obsolete:\r\n\r\n{code:objc}- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url\r\n{\r\n\t[launchOptions removeObjectForKey:UIApplicationLaunchOptionsURLKey];\t\r\n\t[launchOptions setObject:[url absoluteString] forKey:@\"url\"];\r\n\treturn YES;\r\n}{code}\r\n\r\nopenURL will do the work!\r\n\r\n{code:objc}- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation\r\n{\r\n\t[launchOptions removeObjectForKey:UIApplicationLaunchOptionsURLKey];\r\n\t[launchOptions setObject:[url absoluteString] forKey:@\"url\"];\r\n \r\n\t[launchOptions removeObjectForKey:UIApplicationLaunchOptionsSourceApplicationKey];\r\n\t[launchOptions setObject:sourceApplication forKey:@\"source\"];\r\n \r\n\treturn YES;\r\n}\r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: \"Open In\" doesn't catch source App when App is already launched (resuming)", "creator": { "name": "antoniov72", "key": "antoniov72", "displayName": "Antonio Vila", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "antoniov72", "key": "antoniov72", "displayName": "Antonio Vila", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "iOS, Titanium 3.1.X", "comment": { "comments": [ { "id": "268414", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Antonio,\r\n\r\nPlease can you provide a JavaScript test case that we can drop into an app.js and run?\r\n\r\nAlso, some steps to reproduce would be helpful (for example, I'm not sure off the top of my head where you would access the \"Open In\" option)\r\n\r\nThanks!", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-27T18:21:34.000+0000", "updated": "2013-08-27T18:21:34.000+0000" }, { "id": "268579", "author": { "name": "antoniov72", "key": "antoniov72", "displayName": "Antonio Vila", "active": true, "timeZone": "America/Los_Angeles" }, "body": "It is quite simple:\r\n\r\nvar queryString = Ti.App.getArguments().url;\r\nvar sourceApp = Ti.App.getArguments().source;\r\n\r\nTi.Api.info(sourceApp);\r\n\r\nRegardless of the previous sample, the recommended way to obtain source and URL is openUrl (https://developer.apple.com/library/ios/documentation/uikit/reference/UIApplicationDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UIApplicationDelegate/application:openURL:sourceApplication:annotation:). handleOpenURL is deprecated.", "updateAuthor": { "name": "antoniov72", "key": "antoniov72", "displayName": "Antonio Vila", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-28T15:00:35.000+0000", "updated": "2013-08-28T15:00:35.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }