Add file association with tiff files on iOS

I would like to create an associated file with tiff files in my iOS application (that is, so that my application appears as the target for opening TIFF files from Mail or Safari). Adding the following to my Info.plist file does not 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 application that I associate with PDF files the same way and it works great. I find it impossible to associate the application with the tiff file type in iOS, but I cannot find the documentation about that.

Has anyone else been lucky to get this to work or find the final β€œno, you can't do this”?

+5
source share
3 answers

I burned Apple TSI on this (I never use them anyway), and the official answer is: no, you cannot do this.

I registered a request for improvement on the Apple bug reporting site: http://developer.apple.com/bugreporter/ , and I suggest you do this if this problem is a problem for you.

+3
source

Acorn announces file associations for TIFF, which seem to work fine.

The only differences I could see between the Acorn implementation and yours is that Gus omits CFBundleTypeName and adds LSIsAppleDefaultForType (set to true). You can try to try.

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

0
source

General note. Mail and Safari applications really do not allow you to "open with .." tiff files (still true in iOS8);
However, many other applications, such as Dropbox, GDrive, etc., do , let you do it.

0
source

Source: https://habr.com/ru/post/954576/


All Articles