j3k0 / cordova-plugin-openwith

Get your Cordova App in the O.S. "Share" menu on iOS and Android
MIT License
137 stars 114 forks source link

Openwith appears incompatible with the standard approved Push Plugin #13

Open viking2917 opened 6 years ago

viking2917 commented 6 years ago

Build a standard blank Ionic project, add the ios platform, Add the push plugin, build => Builds OK

Add the OpenWith plugin, and build will fail.

NOTE: This is quite possibly a duplicate of https://github.com/phonegap/phonegap-plugin-push/issues/2274, but when built with a different ordering, the failure symptoms are different (can't find Plist, vs linker failure in other case, but underlying cause may be the same). If you add the plugins in the other order, you will get an error more like Issue 2274 on Push plugin.

Prerequisites for the installation are that one has installed cocopods per the Push instructions (see https://github.com/phonegap/phonegap-plugin-push), and that one has set up Developer certs, App Group and App ID in concert (per the directions for this plugin). Then:

ionic start intentTest8 blank --type ionic1
cd intentTest8
   (make sure config.xml has right app id for the App Group)
ionic cordova platform add ios
ionic cordova plugin add phonegap-plugin-push
   (ensure developer signing set correctly)
ionic cordova build ios

=> Works.

Then

cordova plugin add cc.fovea.cordova.openwith --variable ANDROID_MIME_TYPE="text/*"  --variable IOS_URL_SCHEME=ccfoveaopenwithdemo  --variable IOS_UNIFORM_TYPE_IDENTIFIER=public.text
ionic cordova build ios

=> Fails, with errors:

Marks-Air-2:intentTest8 markwatkins$ ionic cordova build ios
> cordova build ios
(node:67347) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CordovaError: Could not find *-Info.plist file, or config.xml file.
(node:67347) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Marks-Air-2:intentTest8 markwatkins$ 

Not sure if something needs to be done to allow the ShareExt target to co-exist with Cocoapods?

viking2917 commented 6 years ago

I believe the issue is that the OpenWith Plugin mangles or otherwise doesn't update the linker flags correctly. Details and workaround here: https://github.com/phonegap/phonegap-plugin-push/issues/2274#event-1536981273

j3k0 commented 6 years ago

Hi, sorry I don't have much time to look into this. Please let me know if you make any findings.

jj449 commented 4 years ago

any update? tried @viking2917 workaround , no luck still can get it work with push-plugin (ios 12.4 , ios 13.3 ) share action can open my app successfully , but intent not received

cordova 9 cordova-ios 5 push-plugin : 2.1.3

Thanks