iphone - Problem with NSSearchPathForDirectoriesInDomains -
I'm trying to work on directories Unfortunately I found a non-writeable directory on running NSSearchPathForDirectoriesInDomains. What do I get:
/ user / me / library / application support / iphone simulator / user / document
when I run examples of other people :
/ user / mine / library / application support / iPhone simulator / user / application / 6958D21C-C94B-4843-9EEF 1-70406D.CA3A3 / Document
is writeable.
The snippet of code used
NSArray * path = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES); NSString * document directory = [path item overindexx: 0]; NSLog (documentsDirectory);
Why do I need to get the same long directory structure?
The document path for your app is GUID , and the expected behavior is.
Not sure what your code looks like, but the path to your app's documentation directory should be something like this:
NSArray * path = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES ); NSString * document directory = [path item overindexx: 0];
(from page 331)
Comments
Post a Comment