EternallLight / cordova-plugin-openwith-ios

A modified version of the Cordova iOS Share extension (cordova-plugin-openwith) by Jean-Christophe Hoelt for iOS. Supports receiving shared URLs, text and images as well as sharing several images at once.
https://web-mystery.com/
MIT License
28 stars 84 forks source link

Failed to install #8

Open ankitjainOfficial opened 6 years ago

ankitjainOfficial commented 6 years ago

Getting an error when trying to install the plugin:

Installing "com.web-mystery.cordova.openwith-ios" for android
Installing "com.web-mystery.cordova.openwith-ios" for ios
Installing "com.web-mystery.cordova.openwith-ios" dependencies
Copying "com.web-mystery.cordova.openwith-ios/ShareExtension" to ios...
Failed to install 'com.web-mystery.cordova.openwith-ios': Error: Missing key while parsing <dict/>.
    at invariant (/Users/ankit/dev/share/platforms/ios/cordova/node_modules/plist/lib/parse.js:53:11)
    at parsePlistXML (/Users/ankit/dev/share/platforms/ios/cordova/node_modules/plist/lib/parse.js:115:9)
    at parsePlistXML (/Users/ankit/dev/share/platforms/ios/cordova/node_modules/plist/lib/parse.js:143:15)
    at parsePlistXML (/Users/ankit/dev/share/platforms/ios/cordova/node_modules/plist/lib/parse.js:101:23)
    at Object.parse (/Users/ankit/dev/share/platforms/ios/cordova/node_modules/plist/lib/parse.js:71:15)
    at Object.graftPLIST (/Users/ankit/dev/share/platforms/ios/cordova/node_modules/cordova-common/src/util/plist-helpers.js:28:21)
    at ConfigFile_graft_child [as graft_child] (/Users/ankit/dev/share/platforms/ios/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js:126:40)
    at PlatformMunger_apply_file_munge [as apply_file_munge] (/Users/ankit/dev/share/platforms/ios/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js:81:34)
    at munge_helper (/Users/ankit/dev/share/platforms/ios/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js:238:14)
    at PlatformMunger.add_plugin_changes (/Users/ankit/dev/share/platforms/ios/cordova/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js:159:12)

This is the command I used to:

ionic cordova plugin add cordova-plugin-openwith-ios   --variable IOS_URL_SCHEME=unique
ankitjainOfficial commented 6 years ago

Same error, when installing from master:

ionic cordova plugin add https://github.com/EternallLight/cordova-plugin-openwith-ios.git --variable IOS_URL_SCHEME=unique
ygyg70 commented 6 years ago

same error with latest cordova ios version.

ankitjainOfficial commented 6 years ago

@ygyg70 Try downgrading your ios as per this comment: https://github.com/EternallLight/cordova-plugin-openwith-ios/issues/7#issuecomment-410306665

UDTDR commented 5 years ago

Can I run this plugin without an iOS downgrade? thanks

UDTDR commented 5 years ago

Can I run this plugin without an iOS downgrade? thanks

I've got the solution:

cordova plugin add https://github.com/EternallLight/cordova-plugin-openwith-ios \ --variable IOS_URL_SCHEME=MyDummyApp

Pavel-Durov commented 5 years ago

I get diffrent error on installation:

→ cordova plugin add cordova-plugin-openwith-ios \
>   --variable IOS_URL_SCHEME=cordovaopenwithdemo

Installing "com.web-mystery.cordova.openwith-ios" for ios
Failed to install 'com.web-mystery.cordova.openwith-ios': CordovaError: Using "requireCordovaModule" to load non-cordova module "child_process" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
    at Context.requireCordovaModule (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/Context.js:57:15)
    at module.exports (/Users/user/git-repos/cordova-plugin-openwith-demo/plugins/com.web-mystery.cordova.openwith-ios/hooks/npmInstall.js:24:33)
    at runScriptViaModuleLoader (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:181:32)
    at runScript (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:157:16)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:125:20
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
Using "requireCordovaModule" to load non-cordova module "child_process" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
joshoconnor89 commented 5 years ago

same here Pavel

joshoconnor89 commented 5 years ago

No idea why this works, but try this:

ionic cordova plugin add https://github.com/joshoconnor89/cordova-plugin-openwith.git --variable ANDROID_MIME_TYPE="image/*" --variable IOS_URL_SCHEME=shareextension --variable IOS_UNIFORM_TYPE_IDENTIFIER=public.image

Some reason, when doing ionic cordova plugin add cc.fovea.cordova.openwith command, it downloads an older version.