I have encrypted files downloaded and available for offline view in a folder, I would like to know:
-
how to open them in the appropriate reader as these are ms office docs and prezi format
-
I suppose they will have to be unencrypted so that reader can read them but in this case how to ensure security?
-
which folder to use to avoid iCloud sync, I already read this Disable iCloud sync
-
Does iOS protects documents of the application by encryption based on app key as I read it or am I wrong?
Speaking extemporaneously, as thoughts occur, Sven is right about
UIDocumentInteractionControllerand that objects are identified by URL.However, it’s possible you don’t need to unencrypt your files on disk for this to work. You can probably write your own little URL protocol (subclass
NSURLProtocoland implement methods appropriately; you should end up checking that URLs are within the invented scheme you’ve created — e.g.myApplicationEncrypted://— then posting data packets to aNSURLProtocolClient) and register it with the device viaNSURLProtocol +registerClass.You’ll obviously need to decrypt between disk and protocol client. So you’ll be passing unencrypted data on — you’ll need to make a trust judgment on
UIDocumentInteractionController.The document interaction controller is documented to work within your app, so there shouldn’t be sandbox concerns.