标签:io ar os 使用 sp for 文件 on log
//1 可读取,不可写入工程下的plist文件;
// NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"OfficialDoc" ofType:@"plist"];
//2 Document 沙盒中的文件(没有文件可自动创建)
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
_plistPath = [documentsDirectory stringByAppendingPathComponent:@"OfficialDoc.plist"];
_docPlist = [[NSMutableDictionary alloc] initWithContentsOfFile:_plistPath];
if (!_docPlist) {
NSLog(@"new list");
_docPlist = [NSMutableDictionary dictionary];
}
NSLog(@"init-----%@",_docPlist);
标签:io ar os 使用 sp for 文件 on log
原文地址:http://www.cnblogs.com/tx8899/p/4084860.html