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

App Icon not displayed in SentTo list - on IOS #41

Open milan12346 opened 5 years ago

milan12346 commented 5 years ago

@j3k0 @NiklasMerz @hoboman313 @davdiv @penguinhardt

I am using this plugin for sharing images with my app. It's working fine with Android devices. But in IOS devices it shows me error first, for ShareViewController.h' file not found during ios build then i added path in plugin.xml for ShareViewController.h' file then it resolved issue

now it's initialized but Icon not displayed in SentTo list untitled

can you please help me to resolve this issue ?

grexican commented 5 years ago

I had this issue too. I had to do cordova plugin remove ... then cordova plugin add ... AFTER adding the ios platform. Doing that then added the share target and added the shareviewcontroller file to my xcode project.

milan12346 commented 5 years ago

Thank you @grexican resolved issue for ShareViewController.h' file not found during ios build. now plugin installed in our project but still app Icon not displayed in SentTo list

milan12346 commented 5 years ago

@j3k0 @NiklasMerz @hoboman313 @davdiv @penguinhardt @grexican In our analysis, some people wrote that IOS is not giving access on OpenWith Apple has made a special exception for Facebook, Skype, Whatsapp, etc and Twitter because of their integration with iOS. Any other apps cannot do that.

Is it true ,please let me know.

NiklasMerz commented 5 years ago

@milan12346 Please don´t mention random people in every comment. Some people are watching this repo and will respond.

I don´t really understand your problem. We got this plugin working for images if it is installed correctly.

milan12346 commented 5 years ago

@NiklasMerz Apologise for mentioning people in comment but I tried to mentioned only contributors.

The problem is, I installed as suggested. Plugin initiated when app install, but still not showing app icon when I tried to share image with my app. As you stated that plugin working for images, can you please help me with examples? I will appreciate your efforts on this issue.

NiklasMerz commented 5 years ago

Is only the icon missing or the whole app in the share menu? Are you sure you can´t enable the app via customize in the share menu? Do you see any errors in Xcode when you open the project?

milan12346 commented 5 years ago

@NiklasMerz

Is only the icon missing or the whole app in the share menu? Only my app icon is not displaying ex. Sharing image to Skype is possible.

Are you sure you can´t enable the app via customize in the share menu? Yes, it is not enable by customize in the share menu (my app is not showing in customize option)

Do you see any errors in Xcode when you open the project? It dosen't seem any error in Xcode.

"8 . repeat the previous five steps for the ShareExtension target." In readme of plugin, I followed all steps from IOS-Setup but step#8 is not clear to me. How I can do it? please suggest

NiklasMerz commented 5 years ago

When you open the Xcode project there are two target in you project. You have to set the group in the main app target and the share extension target.

milan12346 commented 5 years ago

@NiklasMerz
Thanks for your valuable reply. Now the app icon is displayed in the share menu but, on click of the menu item icon of my application it does not redirect to my application.

What should i need to do now?

NiklasMerz commented 5 years ago

Do you have a share handler defined in your app? Do you see any output on the Xcode console?

Am 24. Dez. 2018, 14:10, um 14:10, milan12346 notifications@github.com schrieb:

@NiklasMerz
Thanks for your valuable reply. Now the app icon is displayed in the share menu but, on click of the menu item icon of my application it does not redirect to my application.

What should i need to do now?

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/j3k0/cordova-plugin-openwith/issues/41#issuecomment-449732634

milan12346 commented 5 years ago

@NiklasMerz

Do you have a share handler defined in your app? Yes i have

Do you see any output on the Xcode console? No image

grexican commented 5 years ago

Make sure you've already opened your app once. And try picking a different picture on a second share attempt. I've had issues during dev where it fails for the first link I try (because I had tried it with a previous build version I think) and changing made it work.

Lastly, look at the console output and filter on OpenWith and ShareViewController to see if it's giving you any details/errors. If nothing jumps out at you, try posting your filtered logs here to see if anyone else can make sense of it.

If you open ShareViewController.h what are your two constants in there? Just to make sure it's configured properly.

And lastly, what I end up having to do from time to time, cordova platform remove ios and then cordova platform add ios (followed by plugin remove of openwith and then plugin add to re-add), and then going in to make sure everything is set up properly in general and in configuration.

FWIW I got my native share working on emulator and on native working today (finally) but I used a different build: https://github.com/ygyg70/cordova-plugin-openwith To use that, instead of adding the plugin by name you add it by git URL: cordova plugin add https://github.com/ygyg70/cordova-plugin-openwith.git

Don't forget your --variable declarations in the command line when re-installing!

milan12346 commented 5 years ago

@grexican @NiklasMerz

Can you help me in this error what to do in this 1)First sharing the image to my application icon 2)Entering the text 3)Then click on the post button 4)Redirect Failed to my application (with an error shown below)

PhotoSharing[8271:81900] Failed to inherit CoreMedia permissions from 7749: (null) PhotoSharing[8271:81903] [default] [ERROR] Failed to determine whether URL /Users/Library/Developer/CoreSimulator/Devices/4DAC5A43-0CBE-40BD-94F3-B51423C3C377/data/Media/PhotoData/OutgoingTemp/9E1DF03D-E94E-4EAC-829B-7F09E7BE5836/IMG_0005.JPG (s) is managed by a file provider PhotoSharing[8271:81903] [default] [ERROR] Could not create a bookmark: Error Domain=NSFileProviderInternalErrorDomain Code=0 "NoValidProviderFound_url" UserInfo={NSLocalizedDescription=NoValidProviderFound_url} PhotoSharing[8271:81903] [core] SLComposeServiceViewController got NSURL file:///Users/Library/Developer/CoreSimulator/Devices/4DAC5A43-0CBE-40BD-94F3-B51423C3C377/data/Media/PhotoData/OutgoingTemp/9E1DF03D-E94E-4EAC-829B-7F09E7BE5836/IMG_0005.JPG for public.jpeg error: (null) PhotoSharing[8271:81857] [core] SLComposeServiceViewController got attachment coarseType 1 PhotoSharing[8271:81857] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /Users/Library/Developer/CoreSimulator/Devices/4DAC5A43-0CBE-40BD-94F3-B51423C3C377/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles PhotoSharing[8271:81857] [MC] Reading from private effective user settings. PhotoSharing[8271:81857] [Common] _BSMachError: port 6a03; (os/kern) invalid capability (0x14) "Unable to insert COPY_SEND" PhotoSharing[8271:81857] itemprovider: <NSItemProvider: 0x6040000df950> {types = ( "public.jpeg" )}

NiklasMerz commented 5 years ago

@milan12346 Please open your project in Xcode and check for errors. Maybe something with the app group or URL went wrong. I don´t know this error, maybe @j3k0 can tell more.

benjdg16 commented 5 years ago

Do you guys have any workaround on this?

I have setup the App groups on both targets. The ShareViewController.h is also configured correctly. I have also used the init and addHandler functions.

When I run this using cordova run ios --target='iPhone-X' (on XCode 9) or cordova run ios --target='iPhone-X' --buildFlag='-UseModernBuildSystem=0' (on XCode 10) my application is displayed inside the sharelist, however it does nothing and there is no intent received (init success is logged on console). Meanwhile, when I try running this on XCode it does not show my application inside the sharelist.

Any comment/suggestion is much appreciated, thanks!