Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
909 views
in Technique[技术] by (71.8m points)

iphone - Add a file association with tiff files on iOS

I'd like to create a file associate with tiff files in my iOS app (i.e. so that my app appears as a target for opening tiff files from Mail or Safari). Adding the following to my Info.plist file doesn't seem to work:

<key>CFBundleDocumentTypes</key>
<array>
  <dict>
    <key>CFBundleTypeName</key>
    <string>tiff</string>
    <key>LSItemContentTypes</key>
    <array>
      <string>public.tiff</string>
    </array>
    <key>LSHandlerRank</key>
    <string>Alternate</string>
  </dict>
</array>

I have an app that I associate with PDFs in the same way and it works fine. I believe that it is not possible to associate an app with the tiff file type on iOS, but I can't find any documentation stating that.

Has anyone else had luck getting this to work or finding a definitive "no, you can't do that"?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I burned an Apple TSI on this (I never seem to end up using them anyway) and the official answer is: no, you can't do that.

I've logged an enhancement request on Apple's bug reporting site: http://developer.apple.com/bugreporter/ and I suggest you do too if this issue is a problem for you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...