0

I am trying to add my app to the 'open in' menu. My app supports png format of photos, only png. How can I show the app in the open in menu when a png is being shared, from the photo library for example?

I found this

How do I associate file types with an iPhone application?

but it is not very clear, and I only need to support png...

Community
  • 1
  • 1
user2014474
  • 1,117
  • 5
  • 19
  • 36
  • 1
    Can you specify what's not clear about the other post? Because it explains well what it needed. – rckoenes Sep 05 '13 at 13:53
  • the things that have t be added to the plist file. where does it specify the format? – user2014474 Sep 05 '13 at 13:54
  • `LSItemContentTypes com.sunsetlakesoftware.molecules.pdb org.gnu.gnu-zip-archive ` You will just need to replace this with the one for PNG. – rckoenes Sep 05 '13 at 13:55
  • and what a both com.sunsetlakesoftware.molecules.pdb? – user2014474 Sep 05 '13 at 13:57
  • Read the documentation linked in the answer, it explains all. – rckoenes Sep 05 '13 at 13:59
  • what does this mean: This particular example exports the com.sunsetlakesoftware.molecules.pdb UTI with the .pdb file extension, corresponding to the MIME type chemical/x-pdb. – user2014474 Sep 05 '13 at 14:01
  • FYI - you can register your app to indicate that it opens PNG files but note that the Photos app and the Mail app does not offer the option for images to be opened in ANY 3rd party apps. It's very annoying but it is a choice made by Apple. – rmaddy Sep 05 '13 at 14:05
  • can I use the string public.png (kUTTypePNG) instead of com.sunsetlakesoftware.molecules.pdb? – user2014474 Sep 05 '13 at 14:08

1 Answers1

2

It appears there are a few file types Apple does not allow an application to register as a handler of - JPEG and PNG are on that list. You can define a custom file type/extension and register that easily enough (as in the link you referenced), but Apple seems to prevent applications from showing up in the action sheet to receive images. If you want to see what your info.plist should look like if it were possible to register as a handler of images, take a look at the Evernote app (it's free). They register as a handler of a variety of file types, including images and PDF. For PDF's, Evernote shows up as a target to send the file to, but never in images.

If I were to guess, I'd say this is because Apple doesn't want dozens of applications to show up as the target for an image the user wants to save in Mail, Safari, etc. If any app could register to receive images, it could get confusing for users as to where their saved photos went.

RyanR
  • 7,728
  • 1
  • 25
  • 39
  • 3rd party apps can register for image files. If a 3rd party app chooses to share an image file, all 3rd party apps that register for image files will appear in the "Open In" menu. The issue is that the Mail app and the Photos app choose not to show the standard "Open In" menu for images. It makes no sense for the Mail app since it offers the "Open In" menu for other files such as PDF. – rmaddy Sep 05 '13 at 15:14