Reputation: 37581
If I have a UIWebView
which has links to files then is it possible to save those files to disk outside of the application sandbox?
Yes I know an app can't access the filesystem outside of its sandbox, but could the saving process be done by whatever app can handle the file type? - For example if its an audio file, could my app launch QuickTime passing it the file (or file url) and the user is then able to save the file via the QuickTime app saving it in the appropriate location for audio files?
Upvotes: 3
Views: 2290
Reputation: 52171
It is possible to write images to the photo album which is outside the sandbox.
UIImage* image = [UIImage imageNamed:@"picture_of_my_cat.png"];
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil);
In order to get data out from a UIWebView (javascript to objective C) you can subclass NSURLProtocol
and use jQuery.ajax
.
Upvotes: 2
Reputation: 27601
Apps are limited to saving data within their own sandbox. Which you seem to acknowledge already.
You can make one app launch another, which in theory could allow a second app to save data, but within its own sandbox. You also mention this.
In effect, you've answered your own question.
Upvotes: 1