NSString *pathDocuments = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSLog(@"pathDocuments = %@",pathDocuments);
NSString * path = NSHomeDirectory();
NSLog(@"path = %@",path);
NSUserDefaults * user = [NSUserDefaults standardUserDefaults];
[user setObject:@"yes" forKey:@"BOOLKEY"];
//使用偏好设置是把数据写到沙河目录下/Library/Preferences文件夹里边
//设置同步
[user synchronize];