NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);//多页面操作mydata.plist
if (![[NSFileManager defaultManager] fileExistsAtPath:[[paths objectAtIndex:0] stringByAppendingPathComponent:@"mydata.plist"]]) {
if ([[NSFileManager defaultManager] copyItemAtPath:[[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:@"mydata.plist"] toPath:[[paths objectAtIndex:0] stringByAppendingPathComponent:@"mydata.plist"] error:nil]) {
//NSLog(@"Copy OK");
}
}
拷贝文件的代码~我懂的