Tuesday, September 26, 2017 [Tweets] [Favorites]

iOS Default File Associations

Federico Viticci:

As expected, one of the most common questions I’m getting. iOS needs a new system for default file associations.

Ian McDowell:

Turns out Google Drive registered as the owner of the ‘public.data’ UTI. When they enabled LSSupportsOpenInPlace, they became the default opener for every file format who’s owner does not support open in-place.

It’s a shame that Apple didn’t put safeguards for apps that do this. As the developers of Office, our own apps won’t open our own documents until we support opening in-place, which requires lots of changes to our open/save logic.

Update (2017-09-27): Gabriel Hauber (via Juande SantanderVela):

Dropbox also registers for public.data and public.content but doesn’t set Handler rank to Owner - I think that’s the key?

2 Comments

macOS default file associations are equally frustrating, if not more. Even with the use of tools like duti or cdef, a newly installed application can take possession of whatever file associations it wants. Just put MacVim in your /Applications directory and watch as all conceivable text or code file types have their defaults stolen. And, while UTIs are supposed to set the type, macOS still supports legacy type-by-extension, meaning that there are two separate systems vying for association rights.

The documentation is of little use (see "Launch Services Programming Guide"), and eventually throws its hands up by saying: "If two or more candidate applications remain after all of the foregoing criteria have been applied, Launch Services chooses one of the remaining applications in an unspecified manner." Fantastic. (This is a solved problem in, at least, GNOME, KDE, and Windows, by the way.)

@Robert Agreed, although at least macOS makes it easier to see what’s going on and to override certain types manually.

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment