[TIMOB-12449] iOS: openURL() not working
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | n/a |
Reporter | Chaim Krause |
Assignee | Unknown |
Created | 2013-01-03T12:13:07.000+0000 |
Updated | 2018-02-28T20:03:49.000+0000 |
Description
*Problem description*
Although canOpenURL() reports true, openURL() won't open the document.
*Steps to reproduce*
1. Create a new Single Window Application
2. Alloyify it
3. Put your PDF of choice in the assets dir
4. Modify index.js to the following:
function doClick(e) {
var doc = Ti.UI.iOS.createDocumentViewer({
url : Ti.Filesystem.resourcesDirectory + "AboutDownloads.pdf"
});
doc.show({
animated : true
});
}
var doc = Ti.Filesystem.resourcesDirectory + "AboutDownloads.pdf";
if (Ti.Platform.canOpenURL(doc)) {
alert("Can open document");
Ti.Platform.openURL(doc);
} else {
alert("Cannot open document");
};
$.index.open();
No comments