iOS 8 document provider extensions: Explained

Document provider extensions in iOS 8 are part of the new Extensibility system and allow the features from Document Picker and associated file handling to go beyond iCloud Drive to encompass enterprise storage and popular online services like DropBox, Box, OneDrive, Google Drive, and more. Because it ties into the same system and works the same way, as long as they implement the extension, Apple's making it just as easy to use anyone else's online storage as it is to use iCloud Drive. So, how does it work?

From "Open in..." to open

Traditionally there have been two ways in iOS to work on files contained in online storage providers: Download you're provider's app, find your file, and use "Open in..." to push a copy out to the app you want to use, or hope your provider's service was supported by the developer who made the app you want to use.

Apple discontinued their old iDisk app when they switched from MobileMe to iCloud a couple years ago, but almost all of the big online storage providers made apps available, including Dropbox, Box, Microsoft's OneDrive, Google's Drive, and more. Dropbox, who made an application programming interface (API) available to developers early on, enjoyed some of the widest support.

But it wasn't every app everyone wanted to use, and there was no clear, clean way to round-trip files and avoid amassing duplicates.

Until now.

How document provider extensions work

Document provider extensions hook into the same Document Picker interface that exposes Apple's iCloud Drive and largely work the same way as iCloud Drive. (See iCloud Drive and Document Picker for iOS 8: Explained.

When you install an iOS 8 app that supports document provider extensions, the associated service will be added to the Document Picker options list. So, for example, you open a text editing app and then tap to create a new file or open an existing one, the Document Picker interface would come up and, if you had OneDrive for iOS 8 installed, you'd see OneDrive as an option there right alongside iCloud Drive.

An enterprise could even disable iCloud Drive, if they didn't want employees using it on their work devices, and provide their own, corporate storage services right in the Document Picker instead.

Document provider extensions for developers

For developers, document providers are also very, very similar to iCloud Drive. For the app hosting the Document Picker, document provider extensions and iCloud Drive appear the same.

Document provider extensions become selectable options in the document picker. In addition to the standard document picker mode — the one that lets people create, open, move, etc. files — document picker extensions also have a file provider. There's no interface for it, it simply deals with providing the files, keeping things current, and saving bookmarks. For all of this, file coordination is a must to avoid read/write conflicts and potential data corruption and loss.

Because enterprise IT departments can turn off iCloud Drive support, Apple has created additional ways for developers to create bookmarks to preserve state for document provider extensions. The file provider returns and resolves an identifier.

Once a file is changed, iOS will mark it as such for sync purposes.

All together, it looks like Apple has made it easy to integrate with Document Picker, and hopefully online storage providers create their extensions and developers implement the picker, so all of us can benefit.

Security and Privacy for document picker extensions

Like with iCloud Drive, by default, no app can access the container of another app. Getting around that requires an explicit action like opening Document Picker and tapping an external document to indicate you want to access it outside its container. Document Picker runs "out-of-process" for that reason — so it can see all apps in all public containers.

When you're in an app and call up the Document Picker, then choose a document provider extension, it's Document Picker and not the host app that calls up the provider extensions interface (view controller). Likewise, it's the Document Picker system that performs actions like open on the files and moves them to the host app so you can work on them. All access is controlled by an isolation layer.

Bottom Line

It looks like Apple has given document provider extensions as much access and functionality as their own iCloud Drive, and that's remarkable when you consider the long history of iOS. And like iCloud Drive, document provider extensions make for a quantum leap forward when it comes to file handling on iPhone and iPad. In fact, since there's no iCloud Drive app, but document providers already have apps, they arguably can serve some workflows even better by providing a centralized repository where all files can be browsed, accessed, and organized.

Hopefully in the future we'll see document picker functionality pushed out even further in iOS, for example into Mail or Calendar for attachment handling. That's the best thing about Extensibility — as much as it gives us now, with both Apple and developers involved, there's sure to be even more to come.

Are you exited for document provider extensions in iOS 8? Which online services do you really want to see integrated and with which apps?

More of iOS 8: Explained