File Opener2a

A File Opener Plugin for Cordova.
platforms: android,ios
$ cordova plugin add io.github.pwlin.cordova.plugins.fileopener2a

A File Opener Plugin for Cordova

This plugin will open a file on your device file system with its default application.

Changed iOS-part:

NSURL *fileURL  = [NSURL URLWithString:path]; 


NSURL *fileURL  = [NSURL fileURLWithPath:path]; 

In Cordova 3.4.0 (and above) use entry.toNativeURL() for first parameter. Hint:


  • Android 4+ / iOS 6+
  • Cordova 3.0 or higher


cordova plugin add [url-of-the-git-repo]


Open an APK install dialog:


Open a PDF document with the default PDF reader and optional callback object:

            error : function(errorObj) { 
                alert('Error status: ' + errorObj.status + ' - Error message: ' + errorObj.message); 
            success : function () {
                alert('file opened successfully');              

Please Note that for properly opening a PDF file, you must already have a PDF reader (Acrobat Reader, Foxit Mobile PDF, etc. ) installed on your mobile device. Otherwise this will not work.