Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
297 views
in Technique[技术] by (71.8m points)

iphone - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...