Search code examples
iphoneioscordovaicloud

PhoneGap - Writing to the iCloud directory?


My app is telling me that my iCloud ubiquity container is here:

file://localhost/private/var/mobile/Library/Mobile%20Documents/.../

When I try to get the directory with fileSystem.root.getDirectory, I error and don't get a DirectoryEntry. I tried window.resolveLocalFileSystemURI, but that also ends with error.

How do I get an entry for this directory, so that I can write to it?


Solution

  • Use a javascript bridge. iCloud has so much setup and error handling that it's not really possible to handle this entirely in javascript without a complex wrapper of some kind.