NSString *path = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"favorites.plist"];
BOOL canWrite = [arr writeToFile:path atomically:YES];// arr is an NSArray
我得到了 canWrite = NO。做了一些研究,说主包是只读的。有没有办法让 mainbundle 文件读写?
谢谢,
NSString *path = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"favorites.plist"];
BOOL canWrite = [arr writeToFile:path atomically:YES];// arr is an NSArray
我得到了 canWrite = NO。做了一些研究,说主包是只读的。有没有办法让 mainbundle 文件读写?
谢谢,