Robbie
Robbie

Reputation: 209

Referring to a sandbox file from HTML with iPhone

I'm trying to build a HTML based application for the iPad. I want to build a background process using Objective-C to download images and data and then refer to those from within a HTML file using the UIWebView.

I can successfully download an image and save it to the Documents sandbox directory. In the simulator I can see the path, but that's on my machine, not on the iPhone sandbox. Is there a shortcode for referencing the documents directory?

I want to do something like

~/Documents/image.png

Thanks

Robbie

Upvotes: 1

Views: 265

Answers (1)

V1ru8
V1ru8

Reputation: 6147

To get the Documents directory I use

NSArray *documents = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);

Upvotes: 1

Related Questions