cordova-plugin-openwith-ios icon indicating copy to clipboard operation
cordova-plugin-openwith-ios copied to clipboard

Failed to install

Open ankitjainOfficial opened this issue 5 years ago • 8 comments

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 avatar Sep 05 '18 15:09 ankitjainOfficial

Same error, when installing from master:

ionic cordova plugin add https://github.com/EternallLight/cordova-plugin-openwith-ios.git --variable IOS_URL_SCHEME=unique

ankitjainOfficial avatar Sep 05 '18 15:09 ankitjainOfficial

same error with latest cordova ios version.

ygyg70 avatar Sep 05 '18 16:09 ygyg70

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

ankitjainOfficial avatar Sep 06 '18 08:09 ankitjainOfficial

Can I run this plugin without an iOS downgrade? thanks

UDTDR avatar Feb 07 '19 12:02 UDTDR

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

UDTDR avatar Feb 08 '19 09:02 UDTDR

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.

Pavel-Durov avatar May 19 '19 12:05 Pavel-Durov

same here Pavel

joshoconnor89 avatar Aug 25 '19 20:08 joshoconnor89

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.

joshoconnor89 avatar Aug 25 '19 21:08 joshoconnor89