views:

7981

answers:

3

I want to know whether I can access the directory where my application is installed. Also I want to create a sub directory in the same directory to store all the images I capture in my application. I further want to view the images using iPhone's default image viewer. Can this be done?

A: 

C'mon, this is all in the sample code and documentation. In fact, it's even one of the Frequently Asked Questions in the iPhone Dev Center. I refuse to give the answer. Instead, here's a link: Easily found documentation that answers your question

August
RTFM is not a good answer
pjb3
This is still getting up votes? Ugh. The answer is nowhere to be found on the link you provided. I spent 15 minutes looking for this answer as well. RTFM is not a valid answer, this is a legitimate question.
pjb3
@pjb3 - it is there in the link read carefully. you may find it under title "File Management"
sugar
How do I write information locally?You can write to your application's local storage area. You find the path by calling the Foundation function NSSearchPathForDirectoriesInDomains. For more information, see "Getting Paths to Application Directories" in
sugar
+8  A: 
NSString *appFolderPath = [[NSBundle mainBundle] resourcePath];

NSFileManager *fileManager = [NSFileManager defaultManager];  
NSLog(@"App Directory is: %@", appFolderPath);
NSLog(@"Directory Contents:\n%@", [fileManager directoryContentsAtPath: appFolderPath]);
pjb3
A: 

~/Library/Application Support/iPhone Simulator/User/Applications link text

BeNice