From a78a5275ef1bca49615f0c71242abd64f8c49482 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Hoelt Date: Sat, 23 May 2020 11:41:40 +0300 Subject: [PATCH 1/2] Android only version This plugin might also be useful when other solutions are used on iOS (for example's cordova's built-in [handleOpenURL](https://github.com/apache/cordova-ios/blob/master/guides/Cordova%20Custom%20URL%20Scheme%20Handling.md)). The user would not want to add the ShareExtension to the iOS version, thus this new branch in which ios is disabled. --- package.json | 19 +++---------------- plugin.xml | 51 ++++----------------------------------------------- 2 files changed, 7 insertions(+), 63 deletions(-) diff --git a/package.json b/package.json index 1059368..4b801ea 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,11 @@ { - "name": "cc.fovea.cordova.openwith", + "name": "cc.fovea.cordova.openwith.android", "version": "2.0.0", "description": "Cordova \"Open With\" plugin for iOS and Android", "cordova": { - "id": "cc.fovea.cordova.openwith", + "id": "cc.fovea.cordova.openwith.android", "platforms": [ - "android", - "ios" + "android" ] }, "repository": { @@ -16,11 +15,9 @@ "keywords": [ "ecosystem:cordova", "cordova-android", - "cordova-ios", "cordova", "phonegap", "openwith", - "ios", "android" ], "scripts": { @@ -65,18 +62,8 @@ "src/android/cc/fovea/openwith/OpenWithPlugin.java", "src/android/cc/fovea/openwith/PluginResultSender.java", "src/android/cc/fovea/openwith/Serializer.java", - "src/ios/OpenWithPlugin.m", - "src/ios/ShareExtension/MainInterface.storyboard", - "src/ios/ShareExtension/ShareExtension-Entitlements.plist", - "src/ios/ShareExtension/ShareExtension-Info.plist", - "src/ios/ShareExtension/ShareViewController.h", - "src/ios/ShareExtension/ShareViewController.m", "www/openwith.js", "www/test-openwith.js", - "hooks/iosAddTarget.js", - "hooks/iosRemoveTarget.js", - "hooks/iosCopyShareExtension.js", - "hooks/npmInstall.js", "install-pmd", "plugin.xml", "LICENSE", diff --git a/plugin.xml b/plugin.xml index 0b538e1..ce83dbb 100644 --- a/plugin.xml +++ b/plugin.xml @@ -25,11 +25,11 @@ SOFTWARE. OpenWith - Cordova "Open With" plugin for iOS and Android + Cordova "Open With" plugin for Android @@ -37,50 +37,7 @@ SOFTWARE. https://github.com/j3k0/cordova-plugin-openwith/issues MIT - cordova,phonegap,openwith,ios,android - - - - - - - - - - - - - - - - - - - - - - - - - - - CFBundleURLName - cc.fovea.openwith.$IOS_URL_SCHEME.shareextension - CFBundleURLSchemes - - $IOS_URL_SCHEME - - - - - - - - - - - - + cordova,phonegap,openwith,android @@ -109,7 +66,7 @@ SOFTWARE. - + From 32b3632e9277d8fba081217eeeeb521440a92aec Mon Sep 17 00:00:00 2001 From: Jean-Christophe Hoelt Date: Sat, 23 May 2020 11:51:26 +0300 Subject: [PATCH 2/2] Update README.md --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a077c98..c303f4a 100644 --- a/README.md +++ b/README.md @@ -54,10 +54,8 @@ On the Cordova App side, the plugin checks listens for app start or resume event Here's the promised one liner: ``` -cordova plugin add cc.fovea.cordova.openwith \ - --variable ANDROID_MIME_TYPE="image/*" \ - --variable IOS_URL_SCHEME=ccfoveaopenwithdemo \ - --variable IOS_UNIFORM_TYPE_IDENTIFIER=public.image +cordova plugin add cc.fovea.cordova.openwith.android \ + --variable ANDROID_MIME_TYPE="image/*" ``` | variable | example | notes | @@ -83,7 +81,7 @@ Use the `ANDROID_EXTRA_ACTIONS` to accept additional actions. The variable shoul ``` MY_EXTRA_ACTIONS='' -cordova plugin add cc.fovea.cordova.openwith \ +cordova plugin add cc.fovea.cordova.openwith.android \ --variable ANDROID_MIME_TYPE="image/*" \ --variable "ANDROID_EXTRA_ACTIONS=$MY_EXTRA_ACTIONS" ```