Added back Gillardo's iOS10 fix in #80 - also see #103

This commit is contained in:
pwlin 2017-04-05 17:53:35 +02:00
parent 0be8e27775
commit 69099524c5
4 changed files with 7 additions and 5 deletions

View File

@ -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

View File

@ -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",

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-file-opener2" version="2.0.9">
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android" id="cordova-plugin-file-opener2" version="2.0.10">
<name>File Opener2</name>
<description>A File Opener Plugin for Cordova. (The Original Version)</description>

View File

@ -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);