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

Handler function is not called in case of deployed IOS App on Test Flight.

Open prashant000chaudhary opened this issue 6 years ago • 14 comments

I have implemented this plugin. It is working fine for android. But in the case of IOS. It is working fine when I am installing the app using Xcode locally, But when I am uploading it to Test Flight and installing from there. My app is in the list for share but handler function is not called.

Another Question : How to use this plugin for sharing the different type of files on IOS. As it is working for images only for me.

prashant000chaudhary avatar Aug 20 '18 13:08 prashant000chaudhary

You might have some permission to request in order to be allowed to handle the urlscheme you defined while installing the plugin.

Not very sure... Do you have any kind of error logs or information when trying to use the share function? You might want to check you devices logs... (XCode->Organizer)

On Mon, Aug 20, 2018 at 06:50:32AM -0700, prashant000chaudhary wrote:

I have implemented this plugin. It is working fine for android. But in the case of IOS. It is working fine when I am installing the app using Xcode locally, But when I am uploading it to Test Flight and installing from there. My app is in the list for share but handler function is not called.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/j3k0/cordova-plugin-openwith/issues/25

j3k0 avatar Aug 23 '18 09:08 j3k0

My app is in the list to share the file but when I click on my app icon it opens the app but nothing happened. It is not possible to debug the test flight app as well.

But when I use the same app by installing using Xcode, it is working fine.

prashant000chaudhary avatar Aug 24 '18 10:08 prashant000chaudhary

Did you use Xcode 10 beta? I had problems with extensions and beta versions of Xcode. Using the latest App Store release of XCode fixed this. I found an error message like "Wrong iOS version" in the device logs.

NiklasMerz avatar Sep 18 '18 12:09 NiklasMerz

Does this plugin support Xcode 10?

soulfly avatar Nov 27 '18 15:11 soulfly

@soulfly Didn't try update yet (have to deliver some projects before taking the chance). We never had to update the plugin after a major Xcode release, but who knows..

If you have Xcode 10, install the plugin, try to build, you should get your answer quickly. Let us know if it works or doesn't.

j3k0 avatar Nov 27 '18 15:11 j3k0

@j3k0

Plugin itself works well

But we have some issues there with signing stuff. When providing SHAREEXT_PROVISIONING_PROFILE & SHAREEXT_DEVELOPMENT_TEAM - then it says something went wrong with Xcode proj file,

2018-11-27 01:23:33.578 xcodebuild[6655:1890413] CFPropertyListCreateFromXMLData(): Old-style plist parser: missing semicolon in dictionary on line 1096. Parsing will be abandoned. Break on _CFPropertyListMissingSemicolon to debug.
2018-11-27 01:23:33.581 xcodebuild[6655:1890413] CFPropertyListCreateFromXMLData(): Old-style plist parser: missing semicolon in dictionary on line 1096. Parsing will be abandoned. Break on _CFPropertyListMissingSemicolon to debug.
2018-11-27 01:23:33.583 xcodebuild[6655:1890413] Error Domain=NSCocoaErrorDomain Code=3840 "Unexpected character / at line 1" UserInfo={NSDebugDescription=Unexpected character / at line 1, kCFPropertyListOldStyleParsingError=Error Domain=NSCocoaErrorDomain Code=3840 "Missing ';' on line 1096" UserInfo={NSDebugDescription=Missing ';' on line 1096}}
2018-11-27 01:23:33.584 xcodebuild[6655:1890413] [MT] IDEFileReferenceDebug: [Load] <IDEFileReference, 0x7ff690dc0e20: group:talk.xcodeproj> Failed to load container at path: /Users/Xcloud/ios/talk.xcodeproj, Error: Error Domain=Xcode3ProjectErrorDomain Code=2 "The project 'talk' is damaged and cannot be opened due to a parse error. Examine the project file for invalid edits or unresolved source control conflicts.

so can't automate the signing stuff because of it

soulfly avatar Nov 27 '18 15:11 soulfly

@soulfly Sorry, forget my previous message I didn't notice this was an issue related to cordova-plugin-openwith (I'm also maintaining the cordova in-app purchase plugin that generates far more comments...)

So, indeed the plugin patches the xcode project file to add the required target, cf https://github.com/j3k0/cordova-plugin-openwith/blob/master/hooks/iosAddTarget.js

This in turns relies on nodejs module plist (https://github.com/TooTallNate/plist.js).

I didn't follow Xcode latests changes, so I don't know if and what might change or break... I don't have a test environment for this now anyway (for reasons explained earlier).

It's been a while, but maybe I can guide you in fixing the hook file (iosAddTarget.js)?

j3k0 avatar Nov 27 '18 15:11 j3k0

@j3k0 any hints from you would be very helpful
We are currently going to try it with Xcode9 but anyway, I want to make it fully work at Xcode 10 since we use it widely currently

soulfly avatar Nov 27 '18 15:11 soulfly

To be clear - we also see this issue on Xcode9

@j3k0 just want to understand - does it suppose to work?

soulfly avatar Nov 28 '18 08:11 soulfly

Has there been any word on this? I'm facing the same issue. Works fine in XCode (latest 10.1 build) but testflight I get nothing. The app opens but my handler doesn't get called. I even threw in an alert for good measure... nada.

grexican avatar Dec 23 '18 03:12 grexican

I am using a variation of this plugin, works for me both iOS and Android (had to modify the Android code to make it work) Using with cordova-ios 4.5.4, it didn't work for me with latest version. My repository has the latest version of my code.

ygyg70 avatar Dec 23 '18 03:12 ygyg70

Thanks @ygyg70 for your reply. I'll have to look closer at what you changed. Do you know which piece of your code is what causes it to work? I'm getting the "nothing to share" message, which I've seen other people report. Again, no problems in XCode, but fail in testflight.

Dec 22 23:03:25 Eli-Gasserts-iPhone MODANDA[8433] <Notice>: [OpenWithPlugin.m][onResume] Dec 22 23:03:25 Eli-Gasserts-iPhone MODANDA[8433] <Notice>: [OpenWithPlugin.m][checkForFileToShare] Dec 22 23:03:25 Eli-Gasserts-iPhone MODANDA[8433] <Notice>: [OpenWithPlugin.m][checkForFileToShare] Nothing to share

Can you tell me what your provisioning profile and app ID situation is? I have two App IDs and two provisioning profiles: one for myapp and one for myapp.shareextensions. I didn't create a wildcard app ID when I first created myapp, and I couldn't figure out any other way to get the compiler to be happy except to do what I said to do above. All the tutorials showed adding the groups directly in XCode. I'm managing my app IDs, profiles, and signing manually and not using XCode to manage it for me, so maybe in doing so I have a weird/bad configuration?

grexican avatar Dec 23 '18 04:12 grexican

I have 4 provisioning profiles - development and distribution for app and extension. use XCode auto signing. I tried a few plugins including this one, ended up using https://github.com/missive/cordova-plugin-openwith. Modified the Android code, not the iOS code. I can see that this repository has been active since I evaluated it.

ygyg70 avatar Dec 23 '18 05:12 ygyg70

@ygyg70 you're my hero of the day! Your version worked for me on native and emulator. Now I'm having android issues, possibly because I'm using a different plugin for android intents and it's conflicting.... TBD! I can work that out later.

Thanks!

grexican avatar Dec 24 '18 17:12 grexican