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
2009-02-05 15:10:36
RTFM is not a good answer
pjb3
2009-03-13 16:02:08
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
2009-03-14 08:52:08
@pjb3 - it is there in the link read carefully. you may find it under title "File Management"
sugar
2009-09-12 20:24:23
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
2009-09-12 20:28:33
+8
A:
NSString *appFolderPath = [[NSBundle mainBundle] resourcePath];
NSFileManager *fileManager = [NSFileManager defaultManager];
NSLog(@"App Directory is: %@", appFolderPath);
NSLog(@"Directory Contents:\n%@", [fileManager directoryContentsAtPath: appFolderPath]);
pjb3
2009-03-13 16:23:07