If your plist name is "friends"
just use the code below (it will find if the file exists or not and copy)
NSFileManager *fileManger=[NSFileManager defaultManager];
NSError *error;
NSArray *pathsArray = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);
NSString *doumentDirectoryPath=[pathsArray objectAtIndex:0];
NSString *destinationPath= [doumentDirectoryPath stringByAppendingPathComponent:@"friends.plist"];
NSLog(@"plist path %@",destinationPath);
if ([fileManger fileExistsAtPath:destinationPath]){
//NSLog(@"database localtion %@",destinationPath);
return;
}
NSString *sourcePath=[[[NSBundle mainBundle] resourcePath]stringByAppendingPathComponent:@"friends.plist:];
[fileManger copyItemAtPath:sourcePath toPath:destinationPath error:&error];
which will copy plist from resources to the document directory
source
share