Protect the store file with iOS security features.
This commit is contained in:
parent
6ce6f6b9ec
commit
2b9fcfe030
@ -238,9 +238,9 @@
|
|||||||
|
|
||||||
[AlertViewController showAlertWithTitle:[PearlStrings get].commonTitleError
|
[AlertViewController showAlertWithTitle:[PearlStrings get].commonTitleError
|
||||||
message:
|
message:
|
||||||
@"Incorrect master password.\n\n"
|
@"Incorrect master password.\n\n"
|
||||||
@"If you are trying to use the app with a different master password, "
|
@"If you are trying to use the app with a different master password, "
|
||||||
@"flip the 'Change my password' option in Settings."
|
@"flip the 'Change my password' option in Settings."
|
||||||
viewStyle:UIAlertViewStyleDefault
|
viewStyle:UIAlertViewStyleDefault
|
||||||
tappedButtonBlock:
|
tappedButtonBlock:
|
||||||
^(UIAlertView *alert, NSInteger buttonIndex) {
|
^(UIAlertView *alert, NSInteger buttonIndex) {
|
||||||
@ -422,6 +422,11 @@
|
|||||||
@throw [NSException exceptionWithName:error.domain reason:error.localizedDescription
|
@throw [NSException exceptionWithName:error.domain reason:error.localizedDescription
|
||||||
userInfo:[NSDictionary dictionaryWithObject:error forKey:@"cause"]];
|
userInfo:[NSDictionary dictionaryWithObject:error forKey:@"cause"]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (![[NSFileManager defaultManager] setAttributes:[NSDictionary dictionaryWithObject:NSFileProtectionComplete
|
||||||
|
forKey:NSFileProtectionKey]
|
||||||
|
ofItemAtPath:storeURL.path error:&error])
|
||||||
|
err(@"Unresolved error %@, %@", error, [error userInfo]);
|
||||||
[__persistentStoreCoordinator unlock];
|
[__persistentStoreCoordinator unlock];
|
||||||
|
|
||||||
return __persistentStoreCoordinator;
|
return __persistentStoreCoordinator;
|
||||||
|
Loading…
Reference in New Issue
Block a user