1

I've read that ios apps can communicate via unique urls. An online tutorial on tutsplus says

Communication between apps provides your application with an opportunity to take advantage of other application’s functionality, send and receive data between apps, and provide a rich user experience that “just works”.

I have to admit that since I have no experience with objective c and cocoa I only scanned the article. But as far as I've understood the url based communication, your app can register a unique url that serves as a socket for communication.

Is this not the perfect basis for a crude file system ? I know that all ios apps run in a sandbox and can only access their own data. I do recognose the merits of this design decision but still it seems cure and curse at the same time. This is not meant to be a discussion about apple's ecosystem and the concept of ios apps.

My question is simply:

Can url communication be used to create a file storage that works like a simple "desk" ? I would love an app that could store and host my files to allow a simpler workflow between different apps. Is this technically possible or did I misunderstand the url system ? Would apple allow an app like this in the app store ?

lhk
  • 426
  • 6
  • 10

1 Answers1

1

While I think your use case is solved by the URI scheme communication, it wouldn't be a good user experience. Here's some documentation about the URI handling (see the Implementing Custom URL Schemes section).

To build a file system using that, you'd define a URI scheme that lets other apps tell you an action, a path, and a callback URI. Something like:

x-my-filesystem://home/Documents/MyFile.doc?action=read&callback=x-doc-reader%3A%2F%2F...

When someone tried to open one of your files from another app, it would switch their iPhone to your app. Then when you've handled the request you'd call the callback, and it would hand the thing back to the other app. That's visually jarring as well as slow—you've added twice the transition animation time (about a second in total) on top of the actual work time. In addition, you'd run the risk of being rejected for "duplicating Apple functionality", as the device already has a filesystem. Admittedly not one that can be used for IPC, but it has one.

The Dropbox-style approach of providing an SDK used by host apps solves all of the problems above. Unlike a filesystem for a "traditional" operating system like OS X or Windows, apps need to specifically opt-in to both the Dropbox approach and the custom-URI one outlined above. The remote filesystem technique gives apps cross-device syncing (including potentially across platforms) so is better still than the technique you outline.

  • I've taken a look at dropbox. This is amazing functionality. I just wish that apple would allow iCloud to become like dropbox. All I need is some sharing between apps and it surprises me that this control-concerned company would allow a third party app to become essential for this feature. Dropbox can sync data between apps. iCloud only syncs with the computer. It would be fantastic if I could store data in iCloud and access it with other apps. – lhk Apr 07 '13 at 09:36