I looked at the code for OpenClip, the much-publicized iPhone copy-and-paste API for third-party apps. I was very curious about where exactly they stored the clipboard data, since what they’re claiming really shouldn’t be possible. The Developer FAQ is vague:
OpenClip utilizes a shared space on the iPhone. Applications that use the OpenClip framework can access this common area to write to and read from…
As far as I can tell by a quick glance at the source code, this is how it works: Applications are installed into their own directories named with massive random strings, like this:
/whatever/Applications/474F785BFD/That app’s document files would be stored here:
/whatever/Applications/474F785BFD/Documents/OpenClip apps create their own subdirectory called OpenClip if it doesn’t already exist in the Documents folder and save the clipboard data in a file there, e.g.:
/whatever/Applications/474F785BFD/Documents/OpenClipTo paste the copied data, it iterates through every app’s directory, looking for that OpenClip directory, and reading the clipboard data if it finds it.
See the problem yet?
This means that applications can read any data from other applications. This is a very bad thing, a tremendous security hole, and definitely not allowed by the SDK agreement.
The FAQ states:
OpenClip is 100% SDK kosher. Using Zac White’s “open clipboard” technique, copy / paste between applications is now 100% legitimate and 100% possible.
Unless I’m missing something about how this works, or I’m misreading the code, this is almost certainly very prohibited, and likely to be patched (and disabled) by a future iPhone software update.
And if I’m correct, any application that uses OpenClip is likely to be delisted from the App Store. I won’t go anywhere near it.
I don’t understand how this would work either. I don’t know the specifics of what is(n’t) allowed but applications accessing other application’s spaces doesn’t seem to be possible. As far as I know there isn’t a “my documents” type area where data could be placed.
This does however make everyone wonder why the hell apple hasn’t implemented something like this on their own.