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

Nothing to share?

Open JunkMyFunk opened this issue 6 years ago • 4 comments

I've followed the installation instructions, installed the plugin, setup App Groups, enabled the entitlements, added them to my provisioning profiles, built my app. I've added a handler to my app and see the output in the Xcode console when initialised like this:

[OpenWithPlugin.m][onReset]
[OpenWithPlugin.m][setVerbosity] 0
openwith: init()
[OpenWithPlugin.m][setLogger] OpenWithPlugin252748709
[OpenWithPlugin.m][setHandler] OpenWithPlugin252748710
[OpenWithPlugin.m][init]
[OpenWithPlugin.m][checkForFileToShare]
[OpenWithPlugin.m][checkForFileToShare] Nothing to share
openwith: addHandler()
openwith: initSuccess()
openwith init success!

When opening the Photos app and selecting a photo to share, I see my app in the share with menu. Tapping it opens my app but the console just says:

[OpenWithPlugin.m][onResume]
[OpenWithPlugin.m][checkForFileToShare]
[OpenWithPlugin.m][checkForFileToShare] Nothing to share
PBItemCollectionServicer connection disconnected.

My handler has the console.log output from the demo project so should display the details of any intent received but seems it's not fired at all. I have exhausted all of the help/documentation provided... any ideas what I can do to debug this?

JunkMyFunk avatar May 02 '18 08:05 JunkMyFunk

I'm also facing the same issue while sharing files from other apps, My app opens fine but my handler code never gets executed and xcode logs show 'Nothing to share' as in attached screenshot.

@j3k0 Any Suggestions plz ???

screen shot 2018 05 07 at 6 10 08 am

Anuj-logiciel avatar May 08 '18 09:05 Anuj-logiciel

I know it's been a while. Did you guys found a solution?

j3k0 avatar Jul 17 '18 09:07 j3k0

I have the same issue. I was able to fix it, the problem was my iOS app didn't have correctly set the SHAREEXT_GROUP_IDENTIFIER you can check if it's well defined on the file: ShareViewController.h

FedericoAlvarez avatar Oct 10 '18 20:10 FedericoAlvarez

I am having such a UTI defined in ShareViewController.h

#define SHAREEXT_UNIFORM_TYPE_IDENTIFIER @"com.tinkamo.lineapp.line"

And the identical setup in the project settings image

But I still got "Nothing to share" when I open the file from another app.

2022-10-23 02:11:38.311494+0800 Tinkamo Line[16616:2070973] [OpenWithPlugin.m][onResume]
2022-10-23 02:11:38.311599+0800 Tinkamo Line[16616:2070973] [OpenWithPlugin.m][checkForFileToShare]
2022-10-23 02:11:38.311666+0800 Tinkamo Line[16616:2070973] [OpenWithPlugin.m][checkForFileToShare] Nothing to share

jammind avatar Oct 22 '22 18:10 jammind