Associate file types for vcard with an iPhone application

核能气质少年 提交于 2019-12-09 17:17:46

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!