Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12449] iOS: openURL() not working

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterChaim Krause
AssigneeUnknown
Created2013-01-03T12:13:07.000+0000
Updated2018-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(); 

Comments

No comments

JSON Source