From 69099524c57ea00593bbc4014f7890c1b41b83ce Mon Sep 17 00:00:00 2001 From: pwlin Date: Wed, 5 Apr 2017 17:53:35 +0200 Subject: [PATCH] Added back Gillardo's iOS10 fix in #80 - also see #103 --- README.md | 2 +- package.json | 2 +- plugin.xml | 2 +- src/ios/FileOpener2.m | 6 ++++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 28e29d6..1aadb76 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A File Opener Plugin for Cordova (The Original Version) ========================== This plugin will open a file on your device file system with its default application. -Current Version: 2.0.9 +Current Version: 2.0.10 ---------------- Requirements diff --git a/package.json b/package.json index 982d3dc..9d7109b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-file-opener2", - "version": "2.0.9", + "version": "2.0.10", "description": "A File Opener Plugin for Cordova. (The Original Version)", "cordova": { "id": "cordova-plugin-file-opener2", diff --git a/plugin.xml b/plugin.xml index 6c86421..80acb56 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,5 +1,5 @@ - + File Opener2 A File Opener Plugin for Cordova. (The Original Version) diff --git a/src/ios/FileOpener2.m b/src/ios/FileOpener2.m index b9f67fa..bdb7657 100644 --- a/src/ios/FileOpener2.m +++ b/src/ios/FileOpener2.m @@ -43,8 +43,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. dispatch_async(dispatch_get_main_queue(), ^{ // TODO: test if this is a URI or a path - NSURL *fileURL = [NSURL URLWithString:path]; - + // Use one of the following lines + //NSURL *fileURL = [NSURL URLWithString:path]; + NSURL *fileURL = [NSURL fileURLWithPath:path]; + localFile = fileURL.path; NSLog(@"looking for file at %@", fileURL);