これは、過去 1 日間で非常にイライラするようになりました。
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *path = [documentsDirectory stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.plist",kAllScoresUnorderedArray]];
NSMutableDictionary *test = [[NSMutableDictionary alloc] init];
[test setObject:@"bob" forKey:@"tmo"];
[test writeToFile:path atomically: YES];
以前に使用したことがあり、完全に機能しました。info.plistに追加するのを忘れているものはありますか? それが私が考えることができる唯一のことです。
助けてくれてありがとう!
編集: Xcode 4.5 と iOS6 に何か関係があるのでしょうか? 4.3/iOS5で動作しました