1

My iOS app is a printer application.

My use case is :

1.I need to open an image from Photos app

2.Tap on Share/OpenWith button and should see my App on the Share options list

3.On tapping it my iOS App should get launched and use the image for printing.

Is this possible? I checked Share Extension solution. But it doesn't launch my app.

Also, I need to know how does this share extension will work in this use case. Or any other solution apart from share extension please write it here.

Many thanks in advance.

Kiran Sarvaiya
  • 1,318
  • 1
  • 13
  • 37
DGoogly
  • 329
  • 2
  • 16
  • https://developer.apple.com/documentation/uikit/core_app/communicating_with_other_apps_using_custom_urls and https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Inter-AppCommunication/Inter-AppCommunication.html – PPL Mar 14 '18 at 09:32
  • Share extension is totally a different app which is the same app group. so it will open your share extension app which you need to design its view and extract data from item provider. – Asaduzzaman Shuvro Mar 14 '18 at 09:53
  • Possible duplicate of [Open In For iOS App](https://stackoverflow.com/questions/29140316/open-in-for-ios-app) – El Tomato Mar 14 '18 at 09:56
  • With other applications "Openin" option is available and my app is been listed under it. But What I need is "open in from Native "Photos" app of an iPhone/iPad" – DGoogly Mar 14 '18 at 10:06
  • I found a workaround for this. I have used the url schema for OpenUrl method of Appdelegate from my ShareViewController which will launch the app. And for sending image - I used AppGroupID and NSUserDefaults to send the image data to my app. If anybody needs more info on this ping me here. And Thanks to everyone who responded to my question. – DGoogly Apr 02 '18 at 06:27

0 Answers0