Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't I register my iOS application to handle the image file type?

I have a problem registering image file types to my application. I tried adding the code below to my plist but nothing happens.

<key>CFBundleDocumentTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeName</key>
            <string>Scary Bug Document</string>
            <key>LSHandlerRank</key>
            <string>Alternate</string>
            <key>CFBundleTypeRole</key>
            <string>None</string>
            <key>LSItemContentTypes</key>
            <array>
                <string>public.image</string>
            </array>
        </dict>
    </array>

I noticed that I can register for other file types, such as text (changing the public.image to public.text) but it just won't work with images (the "Open In .." menu is not showing my app).

What could be causing this, and how could I fix it?

like image 507
Alex Stanciu Avatar asked Feb 08 '12 16:02

Alex Stanciu


People also ask

What file format do iOS apps use?

An .ipa file is an iOS and iPadOS application archive file which stores an iOS/iPadOS app. Each .ipa file includes a binary and can only be installed on an iOS, iPadOS, or ARM-based macOS device.

How do I get my application to show up in the open in menu on iOS for a specific document type?

Q: How do I get my application to show up in the “Open in...” menu on iOS for a specific document type? A: You need to register the document types that your application can open with iOS. To do this you need to add a document type to your app's Info. plist for each document type that your app can open.

How do you distribute iOS apps?

You can useTestFlight to distribute iOS, tvOS, and watchOS beta builds to testers and collect feedback. If you want to distribute your app to registered devices, to beta testers using TestFlight, or through the App Store, you need to join the Apple Developer Program.


1 Answers

It is now possible to open images from the mail app in iOS 7, it's just somewhat convoluted:

Tap and hold the image. Tap on Quick Look so the image goes fullscreen. Tap the image to show the top toolbar. Tap the open in button at the top right. Scroll the list to the left to find your app.

Be sure to set up your bundle document types for the image types you are interested in.

like image 106
Dimitri Bouniol Avatar answered Oct 11 '22 16:10

Dimitri Bouniol