7

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"?

Josh Knauer
  • 1,744
  • 2
  • 17
  • 29

3 Answers3

3

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.

Josh Knauer
  • 1,744
  • 2
  • 17
  • 29
  • You are the only one with actual information on this, sir. I salute you. It's still an issue, in case others might wonder. Nothing inheriting from public.image will get your app into the sharing screen. – Heiberg Mar 07 '14 at 11:07
  • I believe I have observed another clue to this. When the system gets an error on the TIFF image preview, it will allow apps which registered the mime type to open it. I have a wide range of TIFF images to test my code and many won't load using Apple's built-in code, so these can be opened by my app's file association. – BitBank Jan 19 '15 at 08:42
0

Acorn declares file associations for TIFFs, which seems to work fine.

The only differences I could see between Acorn's implementation and yours is that Gus omits CFBundleTypeName and adds LSIsAppleDefaultForType (set to true). You might want to give that a try.

LSIsAppleDefaultForType is undocumented. There's a reference to it here: http://lists.apple.com/archives/cocoa-dev/2006/Jun/msg00747.html

skue
  • 2,057
  • 15
  • 18
-1

An general note - the Mail and Safari apps indeed does not allow you to "open with .." tiff files (still true in iOS8);
Nevertheless, a lot of other apps, such as Dropbox, GDrive, etc, does allow you to do that.

Morse
  • 695
  • 8
  • 8