Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I integrate my ios app into the "Share out" pane in the iOS messages photo viewer?

I'm seeing a number of different applications appear in the "share out" pane that appears when you are messaged an image on iOS 6+ and would like to plop my application into there as well. How can I go about doing that? Here is a screenshot for clarification:

The "share out" pane

My app would take a place next to Catch or Evernote for example.

Thanks

like image 651
Karoh Avatar asked Apr 25 '13 23:04

Karoh


1 Answers

You need to indicate that your app can open image files. This is done in the Info.plist:

<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeName</key>
        <string>Images</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>public.image</string>
        </array>
    </dict>
</array>

The above will allow your app to appear in the "open in" menu for images. If your app is selected, your app will be launched or brought to the foreground and the application:openURL:sourceApplication:annotation: delegate method will be called. The URL will contain a reference to the image file.

like image 106
rmaddy Avatar answered Sep 25 '22 17:09

rmaddy