anurag
anurag

Reputation: 111

Where should I save images in my iPhone app?

I am developing an application for iphone that will pick an image from photo library and save it at some other place.Now in my application i will be using this image later on from that place.

So can anybody suggest the folder where should i save this image so that the application works perfectly on device also.

Upvotes: 2

Views: 281

Answers (3)

Jakob Borg
Jakob Borg

Reputation: 24515

You want to save it your applications Documents or Library folder. See the Files and Networking Programming Guide and specifically something like:

"Listing 6-1 Getting a file-system path to the application’s Documents/ directory:"

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];

Upvotes: 4

TechZen
TechZen

Reputation: 64428

You would save it to the applications document or library folder. If you want the user to have access to it on the iPad, put it in the documents folder. If only code will access it, put it in the library folder.

Upvotes: 0

Alistair
Alistair

Reputation: 1326

Have a look at this snippet http://snipplr.com/view/28080/save-image-example/, each application has a 'Documents' folder where you could save the image too.

Upvotes: 1

Related Questions