How to support external UTIs on the iPhone
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
精彩评论