2

Hi I would like to register to support image files in my app; so when user tap on the action button in iPhone's photo app, my app icon would show up within the "open with ..." menu. I have the following in my info.plist

<dict>
   <key>LSHandlerRank</key>
   <string>Alternate</string>
   <key>LSItemContentTypes</key>
     <array>
        <string>public.png</string>
     </array>
</dict>


<dict>
   <key>LSHandlerRank</key>
   <string>Alternate</string>
   <key>LSItemContentTypes</key>
      <array>
         <string>public.jpeg</string>
      </array>
</dict>

but can't get it to show up in that menu. is this the correct way? please help thank you!!

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Chris Lin
  • 709
  • 2
  • 10
  • 20

1 Answers1

1

Try like this it works for me

    <key>CFBundleDocumentTypes</key>
    <array>
    <dict>
        <key>CFBundleTypeName</key>
        <string>png</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>public.png</string>
        </array>
    </dict>
    <dict>
        <key>CFBundleTypeName</key>
        <string>jpeg</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>public.jpeg</string>
        </array>
    </dict>
    <dict>
        <key>CFBundleTypeName</key>
        <string>tiff</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>public.tiff</string>
        </array>
    </dict>
    </array>

more information in this link http://lists.apple.com/archives/cocoa-dev/2006/Jun/msg00747.html

NSLog
  • 649
  • 1
  • 5
  • 12
  • hi Pran! thanks for your answer! I tried and still not working...is it all the code you need to make it work? do I have to do other settings else where? – Chris Lin Jun 05 '13 at 13:23
  • still not able to work...so when you tap on the action button in Photo app it would show your app name / icon? – Chris Lin Jun 05 '13 at 13:37
  • Hi Chris Lin i updated my answer can please check no more setting this will work. – NSLog Jun 05 '13 at 13:38
  • yes exactly .my app supports more than 10 type of files .try like this send image to mail open that mail in mailApp. – NSLog Jun 05 '13 at 13:40
  • Does anyone had some luck with this on iOS7? – Ben Groot Feb 05 '14 at 11:07
  • Does anyone had some luck with this on iOS8??? http://stackoverflow.com/questions/27419177/ios-8-open-image-in-my-app-from-another-apps – Siu Chung Chan Mar 24 '15 at 09:33