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

StackOverflow https://stackoverflow.com/questions/16226337

  •  13-04-2022
  •  | 
  •  

문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top