[英]How do I register my iOS app to open zip files from within the mail app in iOS 6+?
我有一个应用程序,我通过在info.plist中添加以下内容来注册打开zip文件:
<dict>
<key>CFBundleTypeName</key>
<string>Zip archive</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>com.pkware.zip-archive</string>
</array>
</dict>
在iOS 5中,这足以让邮件应用程序提供在我的应用程序中打开zip文件。 在iOS 6中,它不是; 该文件不使用我的应用程序的图标,我的应用程序不会出现在列表中。 (但它确实使用邮件撰写视图中的图标)
我已经尝试将CFBundleTypeRole
更改为Viewer,将LSHandlerRank
为Default,甚至更改为Owner。 我需要添加其他东西才能让它在iOS 6中运行吗? 或者他们刚刚删除了从邮件应用程序打开zip文件的能力?
以下是IOS 7中适合我的内容。
<dict>
<key>CFBundleTypeName</key>
<string>Zip archive</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSItemContentTypes</key>
<array>
<string>com.pkware.zip-archive</string>
</array>
<key>UTTypeTagSpecification</key>
<dict>
<key>public.filename-extension</key>
<string>zip</string>
<key>public.mime-type</key>
<string>application/zip</string>
</dict>
<key>LSHandlerRank</key>
<string>Owner</string>
</dict>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.