Tuesday, 11 November 2014

Cloud storage in iOS 8.1 doesn't work as you expect

iCloud icon in a dark sky.

Box, Dropbox, and Google Drive all support Apple's cloud storage APIs, but only Box works with direct open and save for files

One of the big changes in iOS 8.1 was support for third-party cloud storage providers, using a new set of APIs in Xcode 6. With the new APIs, apps can directly open files from and save them to cloud storage providers like Box, Dropbox, and Google Drive. Apple implemented the feature in its iWork suite — Pages, Numbers, and Keynote — and in the last few weeks Box, Dropbox, and Google Drive implemented the APIs in their iOS apps.

If you run Box, Dropbox, and/or Google Drive on your iPhone or iPad, you should be able to access those cloud storage services directly from iWork and other apps that support the new cloud file APIs, right? 

Wrong.

If you use any of the iWork apps, you have the ability to enable Box, Dropbox, and Google Drive as supported cloud storage services, but when you actually try to open files, you can only access those on Box.

The issue is that the new iOS 8.1 APIs provide two ways to access cloud storage services, and not all cloud providers have done the work to implement the one that most people would prefer: open and save. Instead, they implement the simpler APIs to import and export.

In fact, of the four major cloud storage providers — Box, Dropbox, Google Drive, and Microsoft OneDrive — only Box supports open and save through the iOS 8.1 APIs. Dropbox and Google Drive support import and export, but not open and save; Microsoft OneDrive supports none of the iOS 8.1 file-management APIs.

The reason is complexity. The import and export APIs handle a simple task: move files into and out of app sandboxes. Remember, iOS apps are sandboxed, so they can't be infected with viruses and the like. That also means the communication with other apps is highly regulated and limited. In fact, until iOS 8.1, the only way to move data to other apps was through the Open In APIs that you typically access via the Share menu to copy that data to the destination app.

The import and export APIs are essentially a variation of Open In, with bidirectional file copying (that is, importing and exporting). They're easy to implement.

The open and save APIs are trickier, as Apple readily admits, because the data is not being copied from one sandbox to another but instead accessed across the sandbox boundaries. The cloud storage app thus has to implement a bevy of services around security and file management to let other apps work with files in the cloud app's sandbox. Apple's APIs enable direct access across sandbox boundaries, but the development work is much trickier. So far, only Box has done the heavy lifting to take advantage of them.

All the major cloud services have their own APIs that developers can use to provide direct file access from other apps (over Internet connections, not through the native cloud storage app). That direct approach is what, for example, Microsoft uses in its recent iOS update to Word, Excel, and PowerPoint to provide Dropbox access. GoodReader has long used that approach in iOS as well. 

Direct access through the provider's open APIs also works with other platforms, so it's a simpler method for developers who want to access cloud storage services from their apps. But it comes with a price: You must have an Internet connection to access files. If you use an iOS cloud storage app as the intermediary, it can store files locally, so you have access to them when offline — the app syncs the versions later when an Internet connection is reestablished.

We'll see if that offline convenience is enough for Dropbox and Google to add support for iOS 8.1's open and save APIs, not just the import and export APIs. (OneDrive is another case: To use the iOS 8.1 cloud access APIs for third parties, you must support Apple's iCloud Drive, which Microsoft has not wanted to do so far for its Office suite.)

App developers also need to follow suit to actually take advantage of the cloud services that do implement the new cloud storage APIs —as far as I can tell, only Apple's iWork suite does so today.
Until then, iOS 8.1's cloud APIs are more useful in theory than in practice.

Source: http://www.infoworld.com

No comments:

Post a Comment