iPhoneアプリのドキュメントフォルダにファイルを書きたい。しかし、私が道を開こうとすると、私は
ココアエラー257-許可が拒否されました。
これが小さなコードスニペットです:
// create path to file
NSURL *path = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] objectAtIndex:0];
NSLog(@"%@", [path description]);
NSError *error = nil;
NSString *filename = [NSString stringWithContentsOfURL:path encoding:NSUTF8StringEncoding error:&error];
NSLog(@"%@", error);
NSLog(@"%@", [filename description]);
そのコードの何が問題になっているのか教えていただけますか?ありがとう!