将vcard的文件类型与iPhone应用程序相关联
问题描述:
我在info.plist文件中进行了以下更改
I have done following changes in my info.plist file
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>Visiting Card</string>
<key>CFBundleTypeIconFiles</key>
<array>
<string>Icon.png</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>public.vcard</string>
</array>
</dict>
</array>
当我按住vcard附件时,而不是给我一个在联系人应用程序中打开它的选项或者使用我的应用程序,只需使用联系人应用程序打开它...我应该如何选择使用我的应用程序打开它?请尽快回复....
When I press and hold the vcard attachment, instead of giving me an option to open it in contacts app or with my application it simply opens it up with contacts app...How should I get the option to open it with my app? Please reply ASAP....
答
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>VCard Files</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Alternate</string>
<key>LSItemContentTypes</key>
<array>
<string>public.vcard</string>
</array>
</dict>
</array>