开发者

How to support external UTIs on the iPhone

开发者 https://www.devze.com 2023-03-12 10:45 出处:网络
I have been working on this for awhile for an app that I have been working on.The app is able to open up different files from other apps like mail for example.I have it working on the iPad but I need

I have been working on this for awhile for an app that I have been working on. The app is able to open up different files from other apps like mail for example. I have it working on the iPad but I need it to work on the iPhone as well. I ran into a problem with testing it on the iPhone, however, because the exported file extensions that I have in the UTExportedTypeDeclarations section in the info.plist file of the app are not able to be touched in mail on the iPhone.

Here is what I have in the UTExportedTypeDeclarations section:

       <key>UTExportedTypeDeclarations</key>
<array>
    <dict>
        <开发者_开发知识库;key>UTTypeIdentifier</key>
        <string>com.myapp.ext</string>
        <key>UTTypeDescription</key>
        <string>Generic</string>
        <key>UTTypeConformsTo</key>
        <array>
            <string>public.data</string>
            <string>public.content</string>
        </array>
        <key>UTTypeTagSpecification</key>
        <dict>

            <key>public.filename-extension</key>
            <array>
                <string>ext</string>
    </array>
        </dict>
    </dict>

</array>

I also have this in this in the corresponding CFBundleDocumentTypes :

     <dict>
        <key>CFBundleTypeName</key>
        <string>Generic</string>
        <key>LSHandlerRank</key>
        <string>Alternate</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>com.myapp.ext</string>
        </array>
    </dict>

In conclusion it is not reading the .ext file extension on the iPhone but it is on the iPad. Any help would be much appreciated.

Thank you

0

精彩评论

暂无评论...
验证码 换一张
取 消