Hello. I am getting bald quite quick and need help!
I am writing an app which needs to access directories. I was hoping to get a path of the form /Users/me/Library/Application Support/iPhone Simulator/User/Applications/6958D21C-C94B-4843-9EF1-70406D0CA3A3/Documents.
However my app is giving me /Users/me/Library/Application Support/iPhone Simulator/User/Documents which is not what I want because have no write access.
Here is a thoroughly stripped down edition of my code. Note that you need to look at the console in the simulator to see the output. I have checked all the references I know and have no success to change the behaviour. Is it some compiler option? Or something I have to change in Info.plist? Anybody please...
Update: For some very strange reason my app is not being sandboxed. Why?
File DirTestAppDelegate.h
#import <UIKit/UIKit.h>
@interface DirTestAppDelegate : NSObject <UIApplicationDelegate>
{
UIWindow *window;
}
@end
File DirTestAppDelegate.m
#import "DirTestAppDelegate.h"
@implementation DirTestAppDelegate
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSLog(documentsDirectory);
}
- (void)dealloc
{
[super dealloc];
}
@end