问题
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>
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....
回答1:
<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>
来源:https://stackoverflow.com/questions/8653138/associate-file-types-for-vcard-with-an-iphone-application