English 中文(简体)
某些地点阻挡了我的档案。
原标题:Some sites block my app file type
  • 时间:2011-11-16 01:22:28
  •  标签:
  • iphone

I created my own file type called foo. It is text file. What I want to do is when user touches file name with extension .foo in Safari, my app is executed. But, because it is text file, some sites show that file in text viewer. How can I prevent that? It works fine in other sites. This is what I wrote in my info.plist.

<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeIconFiles</key>
        <array>
            <string>myicon.png</string>
        </array>
        <key>CFBundleTypeName</key>
        <string>my file</string>
        <key>CFBundleTypeRole</key>
        <string>Viewer</string>
        <key>LSHandlerRank</key>
        <string>Owner</string>
        <key>LSItemContentTypes</key>
        <array>
            <string>com.mycompany.foo</string>
        </array>
    </dict>
</array>

<key>UTExportedTypeDeclarations</key>
<array>
    <dict>
        <key>UTTypeDescription</key>
        <string>my file</string>
        <key>UTTypeIdentifier</key>
        <string>com.mycompany.foo</string>
        <key>UTTypeTagSpecification</key>
        <dict>
            <key>public.filename-extension</key>
            <string>foo</string>
        </dict>
    </dict>
</array>
最佳回答

它将与为内容服务的网络服务器上的监评类型有关。 如果没有你担任有关网络服务器,你就无法做到这一点。

希望会有所帮助。

问题回答

暂无回答




相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签