Remove MPCheckpoints, no longer useful. Perform pasteboard importing on a background thread.
This commit is contained in:
parent
fc21bd959f
commit
9d809f34d9
2
External/Pearl
vendored
2
External/Pearl
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 3c7b13b3649c92f7d30e4b8bd0570c8c6b1798c6
|
Subproject commit a0e80c2dfc96e95b3afbfc0d58a5ba1ff6fbf6c3
|
@ -122,10 +122,8 @@ static NSDictionary *keyQuery(MPUserEntity *user) {
|
|||||||
|
|
||||||
// No more methods left, fail if key still not known.
|
// No more methods left, fail if key still not known.
|
||||||
if (!tryKey) {
|
if (!tryKey) {
|
||||||
if (password) {
|
if (password)
|
||||||
inf( @"Login failed for: %@", user.userID );
|
inf( @"Login failed for: %@", user.userID );
|
||||||
MPCheckpoint( MPCheckpointSignInFailed, nil );
|
|
||||||
}
|
|
||||||
|
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
@ -159,7 +157,6 @@ static NSDictionary *keyQuery(MPUserEntity *user) {
|
|||||||
}];
|
}];
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:MPSignedInNotification object:self];
|
[[NSNotificationCenter defaultCenter] postNotificationName:MPSignedInNotification object:self];
|
||||||
MPCheckpoint( MPCheckpointSignedIn, nil );
|
|
||||||
|
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
@ -745,7 +745,6 @@ PearlAssociatedObjectProperty( NSNumber*, StoreCorrupted, storeCorrupted );
|
|||||||
return MPImportResultInternalError;
|
return MPImportResultInternalError;
|
||||||
|
|
||||||
inf( @"Import completed successfully." );
|
inf( @"Import completed successfully." );
|
||||||
MPCheckpoint( MPCheckpointSitesImported, nil );
|
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:MPSitesImportedNotification object:nil userInfo:@{
|
[[NSNotificationCenter defaultCenter] postNotificationName:MPSitesImportedNotification object:nil userInfo:@{
|
||||||
MPSitesImportedNotificationUserKey : user
|
MPSitesImportedNotificationUserKey : user
|
||||||
@ -813,10 +812,6 @@ PearlAssociatedObjectProperty( NSNumber*, StoreCorrupted, storeCorrupted );
|
|||||||
[(loginName?: @"") UTF8String], [siteName UTF8String], content?: @""];
|
[(loginName?: @"") UTF8String], [siteName UTF8String], content?: @""];
|
||||||
}
|
}
|
||||||
|
|
||||||
MPCheckpoint( MPCheckpointSitesExported, @{
|
|
||||||
@"showPasswords" : @(revealPasswords)
|
|
||||||
} );
|
|
||||||
|
|
||||||
return export;
|
return export;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,35 +47,6 @@ typedef NS_ENUM(NSUInteger, MPSiteType) {
|
|||||||
|
|
||||||
#define MPErrorDomain @"MPErrorDomain"
|
#define MPErrorDomain @"MPErrorDomain"
|
||||||
|
|
||||||
#define MPCheckpointHelpChapter @"MPCheckpointHelpChapter"
|
|
||||||
#define MPCheckpointCopyToPasteboard @"MPCheckpointCopyToPasteboard"
|
|
||||||
#define MPCheckpointCopyLoginNameToPasteboard @"MPCheckpointCopyLoginNameToPasteboard"
|
|
||||||
#define MPCheckpointResetPasswordCounter @"MPCheckpointResetPasswordCounter"
|
|
||||||
#define MPCheckpointIncrementPasswordCounter @"MPCheckpointIncrementPasswordCounter"
|
|
||||||
#define MPCheckpointEditPassword @"MPCheckpointEditPassword"
|
|
||||||
#define MPCheckpointEditLoginName @"MPCheckpointEditLoginName"
|
|
||||||
#define MPCheckpointUseType @"MPCheckpointUseType"
|
|
||||||
#define MPCheckpointDeleteSite @"MPCheckpointDeleteSite"
|
|
||||||
#define MPCheckpointShowGuide @"MPCheckpointShowGuide"
|
|
||||||
#define MPCheckpointShowSetup @"MPCheckpointShowSetup"
|
|
||||||
#define MPCheckpointChangeMP @"MPCheckpointChangeMP"
|
|
||||||
#define MPCheckpointMPErrorUbiquity @"MPCheckpointMPErrorUbiquity"
|
|
||||||
#define MPCheckpointLocalStoreReset @"MPCheckpointLocalStoreReset"
|
|
||||||
#define MPCheckpointCloudStoreReset @"MPCheckpointCloudStoreReset"
|
|
||||||
#define MPCheckpointSignInFailed @"MPCheckpointSignInFailed"
|
|
||||||
#define MPCheckpointSignedIn @"MPCheckpointSignedIn"
|
|
||||||
#define MPCheckpointConfig @"MPCheckpointConfig"
|
|
||||||
#define MPCheckpointCloud @"MPCheckpointCloud"
|
|
||||||
#define MPCheckpointSitesImported @"MPCheckpointSitesImported"
|
|
||||||
#define MPCheckpointSitesExported @"MPCheckpointSitesExported"
|
|
||||||
#define MPCheckpointExplicitMigration @"MPCheckpointExplicitMigration"
|
|
||||||
#define MPCheckpointReview @"MPCheckpointReview"
|
|
||||||
#define MPCheckpointApps @"MPCheckpointApps"
|
|
||||||
#define MPCheckpointApp @"MPCheckpointApp"
|
|
||||||
#define MPCheckpointEmergencyGenerator @"MPCheckpointEmergencyGenerator"
|
|
||||||
#define MPCheckpointLogs @"MPCheckpointLogs"
|
|
||||||
#define MPCheckpointStarted @"MPCheckpointStarted"
|
|
||||||
|
|
||||||
#define MPSignedInNotification @"MPSignedInNotification"
|
#define MPSignedInNotification @"MPSignedInNotification"
|
||||||
#define MPSignedOutNotification @"MPSignedOutNotification"
|
#define MPSignedOutNotification @"MPSignedOutNotification"
|
||||||
#define MPKeyForgottenNotification @"MPKeyForgottenNotification"
|
#define MPKeyForgottenNotification @"MPKeyForgottenNotification"
|
||||||
@ -86,8 +57,3 @@ typedef NS_ENUM(NSUInteger, MPSiteType) {
|
|||||||
|
|
||||||
#define MPSitesImportedNotificationUserKey @"MPSitesImportedNotificationUserKey"
|
#define MPSitesImportedNotificationUserKey @"MPSitesImportedNotificationUserKey"
|
||||||
#define MPInconsistenciesFixResultUserKey @"MPInconsistenciesFixResultUserKey"
|
#define MPInconsistenciesFixResultUserKey @"MPInconsistenciesFixResultUserKey"
|
||||||
|
|
||||||
static void MPCheckpoint(NSString *checkpoint, NSDictionary *attributes) {
|
|
||||||
|
|
||||||
inf(@"%@: %@", checkpoint, attributes);
|
|
||||||
}
|
|
||||||
|
@ -138,18 +138,6 @@
|
|||||||
@"Find the store from the user pull‑down after logging in.", latestFeatures )
|
@"Find the store from the user pull‑down after logging in.", latestFeatures )
|
||||||
viewStyle:UIAlertViewStyleDefault initAlert:nil tappedButtonBlock:nil
|
viewStyle:UIAlertViewStyleDefault initAlert:nil tappedButtonBlock:nil
|
||||||
cancelTitle:@"Thanks" otherTitles:nil];
|
cancelTitle:@"Thanks" otherTitles:nil];
|
||||||
|
|
||||||
MPCheckpoint( MPCheckpointStarted, @{
|
|
||||||
@"simulator" : PearlStringB( [PearlDeviceUtils isSimulator] ),
|
|
||||||
@"encrypted" : PearlStringB( [PearlDeviceUtils isAppEncrypted] ),
|
|
||||||
@"jailbroken" : PearlStringB( [PearlDeviceUtils isJailbroken] ),
|
|
||||||
@"platform" : [PearlDeviceUtils platform],
|
|
||||||
#ifdef APPSTORE
|
|
||||||
@"legal" : PearlStringB([PearlDeviceUtils isAppEncrypted]),
|
|
||||||
#else
|
|
||||||
@"legal" : @"YES",
|
|
||||||
#endif
|
|
||||||
} );
|
|
||||||
}
|
}
|
||||||
@catch (id exception) {
|
@catch (id exception) {
|
||||||
err( @"During Post-Startup: %@", exception );
|
err( @"During Post-Startup: %@", exception );
|
||||||
@ -293,33 +281,28 @@
|
|||||||
inf( @"Re-activated" );
|
inf( @"Re-activated" );
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:MPCheckConfigNotification object:nil];
|
[[NSNotificationCenter defaultCenter] postNotificationName:MPCheckConfigNotification object:nil];
|
||||||
|
|
||||||
NSString *importHeader = @"# Master Password site export";
|
PearlNotMainQueue( ^{
|
||||||
NSString *importedSitesString = [UIPasteboard generalPasteboard].string;
|
NSString *importHeader = @"# Master Password site export";
|
||||||
if ([importedSitesString length] > [importHeader length] &&
|
NSString *importedSitesString = [UIPasteboard generalPasteboard].string;
|
||||||
[[importedSitesString substringToIndex:[importHeader length]] isEqualToString:importHeader])
|
if ([importedSitesString length] > [importHeader length] &&
|
||||||
[PearlAlert showAlertWithTitle:@"Import Sites?" message:
|
[[importedSitesString substringToIndex:[importHeader length]] isEqualToString:importHeader])
|
||||||
@"We've detected Master Password import sites on your pasteboard, would you like to import them?"
|
[PearlAlert showAlertWithTitle:@"Import Sites?" message:
|
||||||
viewStyle:UIAlertViewStyleDefault initAlert:nil
|
@"We've detected Master Password import sites on your pasteboard, would you like to import them?"
|
||||||
tappedButtonBlock:^(UIAlertView *alert, NSInteger buttonIndex) {
|
viewStyle:UIAlertViewStyleDefault initAlert:nil
|
||||||
if (buttonIndex == [alert cancelButtonIndex])
|
tappedButtonBlock:^(UIAlertView *alert, NSInteger buttonIndex) {
|
||||||
return;
|
if (buttonIndex == [alert cancelButtonIndex])
|
||||||
|
return;
|
||||||
|
|
||||||
[self importSites:importedSitesString];
|
[self importSites:importedSitesString];
|
||||||
[UIPasteboard generalPasteboard].string = nil;
|
[UIPasteboard generalPasteboard].string = nil;
|
||||||
} cancelTitle:@"No" otherTitles:@"Import Sites", nil];
|
} cancelTitle:@"No" otherTitles:@"Import Sites", nil];
|
||||||
|
} );
|
||||||
|
|
||||||
[super applicationDidBecomeActive:application];
|
[super applicationDidBecomeActive:application];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - Behavior
|
#pragma mark - Behavior
|
||||||
|
|
||||||
- (void)showReview {
|
|
||||||
|
|
||||||
[super showReview];
|
|
||||||
|
|
||||||
MPCheckpoint( MPCheckpointReview, nil );
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)showFeedbackWithLogs:(BOOL)logs forVC:(UIViewController *)viewController {
|
- (void)showFeedbackWithLogs:(BOOL)logs forVC:(UIViewController *)viewController {
|
||||||
|
|
||||||
if (![PearlEMail canSendMail])
|
if (![PearlEMail canSendMail])
|
||||||
@ -522,8 +505,6 @@
|
|||||||
[self signOutAnimated:YES];
|
[self signOutAnimated:YES];
|
||||||
if (didReset)
|
if (didReset)
|
||||||
didReset();
|
didReset();
|
||||||
|
|
||||||
MPCheckpoint( MPCheckpointChangeMP, nil );
|
|
||||||
}
|
}
|
||||||
cancelTitle:[PearlStrings get].commonButtonAbort
|
cancelTitle:[PearlStrings get].commonButtonAbort
|
||||||
otherTitles:[PearlStrings get].commonButtonContinue, nil];
|
otherTitles:[PearlStrings get].commonButtonContinue, nil];
|
||||||
@ -554,28 +535,25 @@
|
|||||||
[PearlLogger get].printLevel = PearlLogLevelInfo;
|
[PearlLogger get].printLevel = PearlLogLevelInfo;
|
||||||
|
|
||||||
#ifdef CRASHLYTICS
|
#ifdef CRASHLYTICS
|
||||||
[[Crashlytics sharedInstance] setBoolValue:[[MPConfig get].rememberLogin boolValue] forKey:@"rememberLogin"];
|
[[Crashlytics sharedInstance] setBoolValue:[[MPConfig get].rememberLogin boolValue] forKey:@"rememberLogin"];
|
||||||
[[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].sendInfo boolValue] forKey:@"sendInfo"];
|
[[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].sendInfo boolValue] forKey:@"sendInfo"];
|
||||||
[[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].helpHidden boolValue] forKey:@"helpHidden"];
|
[[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].helpHidden boolValue] forKey:@"helpHidden"];
|
||||||
[[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].showSetup boolValue] forKey:@"showQuickStart"];
|
[[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].showSetup boolValue] forKey:@"showQuickStart"];
|
||||||
[[Crashlytics sharedInstance] setBoolValue:[[PearlConfig get].firstRun boolValue] forKey:@"firstRun"];
|
[[Crashlytics sharedInstance] setBoolValue:[[PearlConfig get].firstRun boolValue] forKey:@"firstRun"];
|
||||||
[[Crashlytics sharedInstance] setIntValue:[[PearlConfig get].launchCount intValue] forKey:@"launchCount"];
|
[[Crashlytics sharedInstance] setIntValue:[[PearlConfig get].launchCount intValue] forKey:@"launchCount"];
|
||||||
[[Crashlytics sharedInstance] setBoolValue:[[PearlConfig get].askForReviews boolValue] forKey:@"askForReviews"];
|
[[Crashlytics sharedInstance] setBoolValue:[[PearlConfig get].askForReviews boolValue] forKey:@"askForReviews"];
|
||||||
[[Crashlytics sharedInstance] setIntValue:[[PearlConfig get].reviewAfterLaunches intValue] forKey:@"reviewAfterLaunches"];
|
[[Crashlytics sharedInstance] setIntValue:[[PearlConfig get].reviewAfterLaunches intValue] forKey:@"reviewAfterLaunches"];
|
||||||
[[Crashlytics sharedInstance] setObjectValue:[PearlConfig get].reviewedVersion forKey:@"reviewedVersion"];
|
[[Crashlytics sharedInstance] setObjectValue:[PearlConfig get].reviewedVersion forKey:@"reviewedVersion"];
|
||||||
|
[[Crashlytics sharedInstance] setBoolValue:[PearlDeviceUtils isSimulator] forKey:@"simulator"];
|
||||||
|
[[Crashlytics sharedInstance] setBoolValue:[PearlDeviceUtils isAppEncrypted] forKey:@"encrypted"];
|
||||||
|
[[Crashlytics sharedInstance] setBoolValue:[PearlDeviceUtils isJailbroken] forKey:@"jailbroken"];
|
||||||
|
[[Crashlytics sharedInstance] setObjectValue:[PearlDeviceUtils platform] forKey:@"platform"];
|
||||||
|
#ifdef APPSTORE
|
||||||
|
[[Crashlytics sharedInstance] setBoolValue:[PearlDeviceUtils isAppEncrypted] forKey:@"reviewedVersion"];
|
||||||
|
#else
|
||||||
|
[[Crashlytics sharedInstance] setBoolValue:YES forKey:@"reviewedVersion"];
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
MPCheckpoint( MPCheckpointConfig, @{
|
|
||||||
@"rememberLogin" : @([[MPConfig get].rememberLogin boolValue]),
|
|
||||||
@"sendInfo" : @([[MPiOSConfig get].sendInfo boolValue]),
|
|
||||||
@"helpHidden" : @([[MPiOSConfig get].helpHidden boolValue]),
|
|
||||||
@"showQuickStart" : @([[MPiOSConfig get].showSetup boolValue]),
|
|
||||||
@"firstRun" : @([[PearlConfig get].firstRun boolValue]),
|
|
||||||
@"launchCount" : NilToNSNull( [PearlConfig get].launchCount ),
|
|
||||||
@"askForReviews" : @([[PearlConfig get].askForReviews boolValue]),
|
|
||||||
@"reviewAfterLaunches" : NilToNSNull( [PearlConfig get].reviewAfterLaunches ),
|
|
||||||
@"reviewedVersion" : NilToNSNull( [PearlConfig get].reviewedVersion )
|
|
||||||
} );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BIN
MasterPassword/Resources/Media/ios/icon.sketch
Normal file
BIN
MasterPassword/Resources/Media/ios/icon.sketch
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user