Why do I get “Cocoa error 513” when write files to “/var/mydir/files” on an jailbroken iPhone?
问题 My app will write some files to file system and it is installed in /Application not in /var/mobile/Application, On my develop iPhone, every things goes right.But when distribute to others, They got "Cocoa error 513".The files are written at /var/mydir/files, What's that problem? Where is right place for me to write with full permission? Thank you. Code: NSString *dir = @"/var/mydir/docs/"; NSFileManager *fileManager = [NSFileManager defaultManager]; if(![fileManager fileExistsAtPath:dir]) {