iOS 8 Document Provider extension

Extensions In General

So what are these new extensions that we all keep hearing about? In the last WWDC 2014, one of the more interesting subjects was the App Extensions, which is basically a new tool that allows different 3rd party apps to communicate with each other, or more correctly, allows them to have a controlled shared environment in order to increase the file accessibility between apps in iPhones, iPads and all the iOS system devices. Us developers can now create different extensions in our app to send, open or edit different kind of file like images, docs, pdf’s etc. A „shared folder“ for different uses and file sharing.

In The Past

Up until now, the only ways to transfer a file for example from one app to another was to find your file through a provider’s app and click the “Open in” option to send a copy of the file to another app, that can handle your file once it gets it.

Document Provider

Apple’s new document provider extension provides an interface to the app’s files, in other words, it allows other apps to have a look at the files directory of your app with the ability to open, copy, move, modify or edit the files that are in that app, Something really similar to the Finder app in OS X. When you build the document provider extension into your app, your app will be added to the list of apps that will show once another app will call the document picker, so for example if you are in a photo editing app, and your app has stored photos, the photos from your app can be opened and edited once clicked on your app from the document picker list.

As Developers

The document providers are almost the same as the iCloud Drive, and appear practically the same as well, for those of you who are not familiar with it, here is a good article from iMore about the subject.

Your document provider extension becomes a selectable option in the document picker. Under the document picker there is also a file provider which provides no interface and is simply there to handle the files, keeping the file coordination correct in order to avoid read/write conflicts and data loss. Changed files will be marked by iOS for sync purposes. In other words, the more apps that will implement the document provider extension, the more all of us will benefit.

Glance To The Future

Hopefully the developing of the document provider extension won’t stop here and that Apple will keep building it’s functionally further and further. Taking in consideration that a lot of iOS developers are waiting for such an opportunity, it is safe to say that file handling in iOS would slowly become a lot less of a drag for all of us.

Where To Now

Here is an article for those of you who would like to know more about the document provider. Here is another article for those of you who would like to go deeper into understanding how do the extensions work, and of course last but not least a link to the Apple Documentations about extensions.

Till next time,
Happy coding!

Schreibe einen Kommentar

Time limit is exhausted. Please reload CAPTCHA.