30

I have a picture sharing app which shares pictures among your app friends. My requirement is to show my app in sharing via pop-up, when iOS user choose any photo from photo gallery.

I found solutions for sharing PDF files via custom app, but no luck for iOS "photos".

I have also go through this link https://stackoverflow.com/questions/9266079/why-is-my-iOS-app-not-showing-up-in-other-apps-open-in-dialog and did changes in my app, but it seems not to be working.

enter image description here

Community
  • 1
  • 1
Richa
  • 544
  • 1
  • 8
  • 15
  • possible duplicate of [How to get my iPhone app listed in iPhone's native Photos app share menu?](http://stackoverflow.com/questions/17067039/how-to-get-my-iphone-app-listed-in-iphones-native-photos-app-share-menu) – Peter O. Oct 07 '14 at 05:48

4 Answers4

15

I use "Share Extension" to add my own app in the share list. You have to create a new target of your appwhich template is Share Extension

Be careful!! The Deployment Target version of this target should under the version of your testing device to make sure the icon shows in the list.

Other activities should be defined in the ShareViewController.m created automatically.

Hope my answer can help you :)

Yvonne
  • 179
  • 1
  • 4
  • 1
    Thanks. it is more good if you provide the some sample handling of ShareViewController.m class. – Ayaz Sep 04 '16 at 07:01
  • `The Deployment Target version of this target...` it takes me an hour to figure out why my app doesn't show in the share sheet. – Kimi Chiu Jan 24 '19 at 16:44
  • Thanks. Where can I find information about how to actually retrieve the file's content? How does the handover work? – waldgeist Dec 22 '20 at 20:17
7

You should follow up this documentation to show your app icon in share options,

https://developer.apple.com/library/ios/qa/qa1587/_index.html

In "Document Types",you need to specify the "public.image". so that your app will ready to handle the any image document. If you want to have particular image type say "jpeg" then you should specify the "public.jpeg"

Refer the attached screenshot from this link

enter image description here

enter image description here

  • Thanks Vijay, I am going through your reply, hope it will work for me. – Richa Jun 02 '14 at 07:08
  • 2
    I've can add other document types e.g. com.adobe.pdf but I can't make this work with the Photo app. It seems as if sharing option in Photos app is a special case. See http://stackoverflow.com/questions/17067039/how-to-get-my-iphone-app-listed-in-iphones-native-photos-app-share-menu. – Dale Feb 15 '16 at 22:29
2

Note that in iOS 8 you will actually be able to do this the way you'd think it would work. Register as an app to handle a certain format, all apps exporting that format will show your app as an export target.

In iOS 7 and before, it's very easy to tell the system that your app can handle, say, JPG. But then it's up to the app that owns the document to show your app as one of the sharing options. So for example the iOS Photos app will not show it. It has Facebook and Twitter hard-coded, and no options for anything else.

In iOS 8 and above, you will be able to provide an icon and a custom UIViewController that will show up in any app that has sharing support, including built-in ones.

n13
  • 6,843
  • 53
  • 40
  • The question refers specifically to getting the target app into the Photos app. As far as I can tell this technique may work for other apps but not Photos see http://stackoverflow.com/questions/17067039/how-to-get-my-iphone-app-listed-in-iphones-native-photos-app-share-menu – Dale Feb 15 '16 at 22:32
  • You can do it if you create a share extension for editing photos. Then Photos app will show it as one of the options. This is what share extensions are for (see the other answer) – n13 Feb 17 '16 at 03:16
-3

This can't be done, unfortunately. The screenshot you've shared is showing a UIActivityViewController presented by the Photos app, and there is currently no way to get your app into it. Hopefully that's something that will be allowed in a future iOS release.

Andrew M
  • 651
  • 6
  • 8
  • 2
    I'm not sure why this was down-voted. At the time it was posted, it was correct. iOS 8 later added support for action and sharing extensions. – Andrew M Apr 26 '15 at 22:53
  • 4
    you should update it for now. no one cares what the circumstances were at the time – Esqarrouth Sep 14 '15 at 12:04