Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone: image file extensions doesn't associate to my app

I'm trying to associate my iPhone application to open image files such as jpeg and png. I did it this way:

<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeRole</key>
        <string>Viewer</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>public.image</string>
        </array>
    </dict>
</array>

But this solution doesn't work. If I replace public.image with, for example, public.objective-c-source my app begins to open objective-c source code. But when I use public.image or public.jpeg it doesn't work.

Can you tell where is my mistake? Thank you for answer.

like image 401
Daniil Popov Avatar asked Nov 20 '25 22:11

Daniil Popov


1 Answers

As per this question in apple developer forum (You need to login to devforums.apple.com to see this link), it is not possible. The reason mentioned there is as follows,

Not allowed, it means you will high jack the default behavior of the iOS camera & photo app. Register a file type unique to your app.

like image 166
iDev Avatar answered Nov 22 '25 18:11

iDev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!