{ "id": "107332", "key": "TIMOB-12449", "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-01-03T12:13:07.000+0000", "priority": null, "labels": [], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:49.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": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "*Problem description*\r\nAlthough canOpenURL() reports true, openURL() won't open the document.\r\n\r\n*Steps to reproduce*\r\n1. Create a new Single Window Application\r\n2. Alloyify it\r\n3. Put your PDF of choice in the assets dir\r\n4. Modify index.js to the following:\r\n\r\n{code:javascript}\r\nfunction doClick(e) {\r\n var doc = Ti.UI.iOS.createDocumentViewer({\r\n url : Ti.Filesystem.resourcesDirectory + \"AboutDownloads.pdf\"\r\n });\r\n doc.show({\r\n animated : true\r\n });\r\n}\r\n\r\nvar doc = Ti.Filesystem.resourcesDirectory + \"AboutDownloads.pdf\";\r\nif (Ti.Platform.canOpenURL(doc)) {\r\n alert(\"Can open document\");\r\n Ti.Platform.openURL(doc);\r\n} else {\r\n alert(\"Cannot open document\");\r\n};\r\n\r\n$.index.open(); \r\n{code}", "attachment": [], "flagged": false, "summary": "iOS: openURL() not working", "creator": { "name": "tinjaw", "key": "tinjaw", "displayName": "Chaim Krause", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "tinjaw", "key": "tinjaw", "displayName": "Chaim Krause", "active": true, "timeZone": "America/Chicago" }, "environment": "iOS 6\r\nTi 3.0", "comment": { "comments": [], "maxResults": 0, "total": 0, "startAt": 0 } } }