{ "id": "175573", "key": "AC-6609", "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": null, "resolutiondate": null, "created": "2020-09-28T11:12:41.000+0000", "labels": [ "ios" ], "versions": [], "issuelinks": [], "assignee": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-09-28T16:13:12.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [], "description": "I am trying to test for the presence of another app installed on a device on iOS using the latest version of Titanium (currently {{9.2.0.GA}}).\r\n\r\nFor some reason the function {{canOpenURL()}} always returns the same value regardless of whether the app is installed or not.\r\n\r\nMy code is as follows:\r\n\r\n{code:js}\r\nvar strUrl = \"whatsapp://\";\r\nif (Titanium.Platform.canOpenURL(strUrl)) {\r\n Ti.API.info(\"can open whatsapp\");\r\n Ti.Platform.openURL(strUrl);\r\n} else {\r\n Ti.API.info(\"can't open whatsapp\");\r\n Ti.Platform.openURL(\"itms://itunes.apple.com/app/apple-store/idXXXXXXXX?mt=8\");\r\n}\r\n{code}\r\n\r\nIf I list WhatsApp in my {{CFBundleURLSchemes}} the function always returns true whether I have the app installed or not. If it is not listed it always returns false. I have also tried capturing the value from {{Ti.Platform.openURL()}} which seems to do the same.\r\n\r\nAny idea what I am missing?", "attachment": [], "flagged": false, "summary": "canOpenURL() always returns the same value", "creator": { "name": "ldebna", "key": "ldebna", "displayName": "Lee Debnam", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "ldebna", "key": "ldebna", "displayName": "Lee Debnam", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "457060", "author": { "name": "ldebna", "key": "ldebna", "displayName": "Lee Debnam", "active": true, "timeZone": "America/Los_Angeles" }, "body": "If I ditch the CFBundleScheme (I realise here I'm calling this app whatsapp) and list whatsapp in the LSApplicationQueriesSchemes then the function always returns false.", "updateAuthor": { "name": "ldebna", "key": "ldebna", "displayName": "Lee Debnam", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-09-28T16:13:12.000+0000", "updated": "2020-09-28T16:13:12.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }