PhoneGap Plugin Openwith does not work with iOS

My app should be able to receive images and text files, that are sent from other apps via SENDTO or SHARE function. I therefore use the phonegap plugin

PhoneGap Build compilation for Android is ok and the app works as expected.

But on iOS, phone gap build compilation stopps with an error. I also tried it with different forks of the plugin, but always the same error.

For the plugins seem to be stable, I assume the problem might be in in the build package prepared for phonegap build. Possibly there is need to include some additional infos/parameters in the build file /build.json.

My manifest looks like following:
<plugin name="cordova-plugin-openwith-cxm2" source="npm">
<variable name="IOS_URL_SCHEME" value="cordovaopenwith" />
<variable name="IOS_UNIFORM_TYPE_IDENTIFIER" value="public.text" />
<variable name="DISPLAY_NAME" value="my app name" />
<variable name="SHAREEXT_DEVELOPMENT_TEAM" value="my dev id" />
<variable name="SHAREEXT_PROVISIONING_PROFILE" value="my profile" />
<variable name="IOS_GROUP_IDENTIFIER" value="" />
<variable name="ANDROID_MIME_TYPE" value="*/*" />
<variable name="ANDROID_EXTRA_ACTIONS" value="
&lt;action android:name=&quot;android.intent.action.SENDTO&quot;/&gt;
&lt;action android:name=&quot;android.intent.action.MAILTO&quot;/&gt;
"/> </plugin>

Thank you for any tipps and hints…

What’s the phonegap error in the build log?

Error: xcodebuild: Command failed with exit code 65
    at ChildProcess.whenDone (/private/project/cordova/node_modules/cordova-common/src/superspawn.js:135:23)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:962:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)

This line in your manifest looks odd.

Can you copy and paste your manifest again? This time, enclose it in triple back ticks (```) and it will format properly.

Besides George’s comment about your config.xml (which you should check by running through an xml linter) - when googling your error it shows two possible causes: 1) is caused by a conflict when two different plugins pull in dark mode support; 2) is caused by plugins requiring an Xcode version not being implemented by the build engine. #1 can be tested by removing all but the most essential plugin while #2 can be tested by going back a version or two of the plugin supporting the share menu.

Thank you, but I think the manifest is ok (I have edit my post and now forum display is not corrupted anymore, I just anonymized app related variables), for it compliles without problems for Android.
Also I think that the plugin and/or its forks require no specifix Xcode version, for they seem to be quite popular and frequently used.

Possibly there is a need for a specific XCode setting, that probably should set with the build.json. The plugin doc says:

iOS Setup

After having installed the plugin, with the ios platform in place, 1 operation needs to be done manually: setup the App Group on both the Cordova App and the Share Extension.

  1. open the xcodeproject for your application
  2. select the root element of your project navigator (the left-side pane)
  3. select the target of your application
  4. select capabilities
  5. scroll down to App Groups
  6. make sure it’s ON
  7. create and activate an App Group called: group.<YOUR_APP_BUNDLE_ID>.shareextension
  8. repeat the previous five steps for the ShareExtension target .

You might also have to select a Team for both the App and Share Extension targets, make sure to select the same.

Build, XCode might complain about a few things to setup that it will fix for you (creation entitlements files, etc)

Are you doing this on a Mac?

You may need to build using the PhoneGap CLI instead of PhoneGap Build. It’s a much more complex process, but lets you get at a lot of stuff which PhoneGap Build “simplifies” for you.

@PPetree: No, I’m using PhoneGap Build from PC, but this shouldn’t matter.

@George: thanky, I’ve feared to hear that… But on the other hand, it seems that we can not rely anymore that Adobe will maintain Phonegap Build.
So better today than tomorrow, it would be great to have an alternative:
Do you know similar build services like PhoneGap Build or do you have a more detailed instruction, how to setup PhoneGap CLI that it works together with AppStudio ?

I’ve not yet found a plugin that allows you receive from the iOS share menu. They all require you to access Xcode and mess with settings and, from the plugin’s instructions, this seems to be the case here too.

That is a verry interesting approach that i would love to include in my project. Can you please send a mini sample project? Only android is fine. Thanks a lot!

@OliverE - even if you installed cordova (the cli version of phonegap) locally you still can’t build iOS apps on it. For that you’d have to have a mac.

This is why phonegap exists, because many of us either A) don’t have/want a mac and/or B) we don’t want to maintain the cordova installation because it’s a very fragile tool chain. What I mean by that is you install everything and get it all working and the next release of cordova will require some functionality from some other component and when you install that component it breaks two other things that you rely on. It’s like shoveling elephant poop in a wind storm! There’s just no way it’s not gonna get messy!

There was another developer working on a replacement for phonegap when the cli 9.0 debacle cropped up. He actually had the system up and working (I was able to build both ios and android apps on it) but he fell off the planet… shame too as a ton of people would jump ship just to be able to implement this functionality (which you could do on his system).

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.