diff --git a/External/Pearl b/External/Pearl index 3c7b13b3..a0e80c2d 160000 --- a/External/Pearl +++ b/External/Pearl @@ -1 +1 @@ -Subproject commit 3c7b13b3649c92f7d30e4b8bd0570c8c6b1798c6 +Subproject commit a0e80c2dfc96e95b3afbfc0d58a5ba1ff6fbf6c3 diff --git a/MasterPassword/ObjC/MPAppDelegate_Key.m b/MasterPassword/ObjC/MPAppDelegate_Key.m index ed6d5d78..0ba0fa90 100644 --- a/MasterPassword/ObjC/MPAppDelegate_Key.m +++ b/MasterPassword/ObjC/MPAppDelegate_Key.m @@ -122,10 +122,8 @@ static NSDictionary *keyQuery(MPUserEntity *user) { // No more methods left, fail if key still not known. if (!tryKey) { - if (password) { + if (password) inf( @"Login failed for: %@", user.userID ); - MPCheckpoint( MPCheckpointSignInFailed, nil ); - } return NO; } @@ -159,7 +157,6 @@ static NSDictionary *keyQuery(MPUserEntity *user) { }]; [[NSNotificationCenter defaultCenter] postNotificationName:MPSignedInNotification object:self]; - MPCheckpoint( MPCheckpointSignedIn, nil ); return YES; } diff --git a/MasterPassword/ObjC/MPAppDelegate_Store.m b/MasterPassword/ObjC/MPAppDelegate_Store.m index cb8a27bb..09cc59f8 100644 --- a/MasterPassword/ObjC/MPAppDelegate_Store.m +++ b/MasterPassword/ObjC/MPAppDelegate_Store.m @@ -745,7 +745,6 @@ PearlAssociatedObjectProperty( NSNumber*, StoreCorrupted, storeCorrupted ); return MPImportResultInternalError; inf( @"Import completed successfully." ); - MPCheckpoint( MPCheckpointSitesImported, nil ); [[NSNotificationCenter defaultCenter] postNotificationName:MPSitesImportedNotification object:nil userInfo:@{ MPSitesImportedNotificationUserKey : user @@ -813,10 +812,6 @@ PearlAssociatedObjectProperty( NSNumber*, StoreCorrupted, storeCorrupted ); [(loginName?: @"") UTF8String], [siteName UTF8String], content?: @""]; } - MPCheckpoint( MPCheckpointSitesExported, @{ - @"showPasswords" : @(revealPasswords) - } ); - return export; } diff --git a/MasterPassword/ObjC/MPTypes.h b/MasterPassword/ObjC/MPTypes.h index 2b28a159..f5d4f763 100644 --- a/MasterPassword/ObjC/MPTypes.h +++ b/MasterPassword/ObjC/MPTypes.h @@ -47,35 +47,6 @@ typedef NS_ENUM(NSUInteger, MPSiteType) { #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 MPSignedOutNotification @"MPSignedOutNotification" #define MPKeyForgottenNotification @"MPKeyForgottenNotification" @@ -86,8 +57,3 @@ typedef NS_ENUM(NSUInteger, MPSiteType) { #define MPSitesImportedNotificationUserKey @"MPSitesImportedNotificationUserKey" #define MPInconsistenciesFixResultUserKey @"MPInconsistenciesFixResultUserKey" - -static void MPCheckpoint(NSString *checkpoint, NSDictionary *attributes) { - - inf(@"%@: %@", checkpoint, attributes); -} diff --git a/MasterPassword/ObjC/iOS/MPiOSAppDelegate.m b/MasterPassword/ObjC/iOS/MPiOSAppDelegate.m index 473e615b..395f10cb 100644 --- a/MasterPassword/ObjC/iOS/MPiOSAppDelegate.m +++ b/MasterPassword/ObjC/iOS/MPiOSAppDelegate.m @@ -138,18 +138,6 @@ @"Find the store from the user pull‑down after logging in.", latestFeatures ) viewStyle:UIAlertViewStyleDefault initAlert:nil tappedButtonBlock: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) { err( @"During Post-Startup: %@", exception ); @@ -293,33 +281,28 @@ inf( @"Re-activated" ); [[NSNotificationCenter defaultCenter] postNotificationName:MPCheckConfigNotification object:nil]; - NSString *importHeader = @"# Master Password site export"; - NSString *importedSitesString = [UIPasteboard generalPasteboard].string; - if ([importedSitesString length] > [importHeader length] && - [[importedSitesString substringToIndex:[importHeader length]] isEqualToString:importHeader]) - [PearlAlert showAlertWithTitle:@"Import Sites?" message: - @"We've detected Master Password import sites on your pasteboard, would you like to import them?" - viewStyle:UIAlertViewStyleDefault initAlert:nil - tappedButtonBlock:^(UIAlertView *alert, NSInteger buttonIndex) { - if (buttonIndex == [alert cancelButtonIndex]) - return; + PearlNotMainQueue( ^{ + NSString *importHeader = @"# Master Password site export"; + NSString *importedSitesString = [UIPasteboard generalPasteboard].string; + if ([importedSitesString length] > [importHeader length] && + [[importedSitesString substringToIndex:[importHeader length]] isEqualToString:importHeader]) + [PearlAlert showAlertWithTitle:@"Import Sites?" message: + @"We've detected Master Password import sites on your pasteboard, would you like to import them?" + viewStyle:UIAlertViewStyleDefault initAlert:nil + tappedButtonBlock:^(UIAlertView *alert, NSInteger buttonIndex) { + if (buttonIndex == [alert cancelButtonIndex]) + return; - [self importSites:importedSitesString]; - [UIPasteboard generalPasteboard].string = nil; - } cancelTitle:@"No" otherTitles:@"Import Sites", nil]; + [self importSites:importedSitesString]; + [UIPasteboard generalPasteboard].string = nil; + } cancelTitle:@"No" otherTitles:@"Import Sites", nil]; + } ); [super applicationDidBecomeActive:application]; } #pragma mark - Behavior -- (void)showReview { - - [super showReview]; - - MPCheckpoint( MPCheckpointReview, nil ); -} - - (void)showFeedbackWithLogs:(BOOL)logs forVC:(UIViewController *)viewController { if (![PearlEMail canSendMail]) @@ -522,8 +505,6 @@ [self signOutAnimated:YES]; if (didReset) didReset(); - - MPCheckpoint( MPCheckpointChangeMP, nil ); } cancelTitle:[PearlStrings get].commonButtonAbort otherTitles:[PearlStrings get].commonButtonContinue, nil]; @@ -554,28 +535,25 @@ [PearlLogger get].printLevel = PearlLogLevelInfo; #ifdef CRASHLYTICS - [[Crashlytics sharedInstance] setBoolValue:[[MPConfig get].rememberLogin boolValue] forKey:@"rememberLogin"]; - [[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].sendInfo boolValue] forKey:@"sendInfo"]; - [[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].helpHidden boolValue] forKey:@"helpHidden"]; - [[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].showSetup boolValue] forKey:@"showQuickStart"]; - [[Crashlytics sharedInstance] setBoolValue:[[PearlConfig get].firstRun boolValue] forKey:@"firstRun"]; - [[Crashlytics sharedInstance] setIntValue:[[PearlConfig get].launchCount intValue] forKey:@"launchCount"]; - [[Crashlytics sharedInstance] setBoolValue:[[PearlConfig get].askForReviews boolValue] forKey:@"askForReviews"]; - [[Crashlytics sharedInstance] setIntValue:[[PearlConfig get].reviewAfterLaunches intValue] forKey:@"reviewAfterLaunches"]; - [[Crashlytics sharedInstance] setObjectValue:[PearlConfig get].reviewedVersion forKey:@"reviewedVersion"]; + [[Crashlytics sharedInstance] setBoolValue:[[MPConfig get].rememberLogin boolValue] forKey:@"rememberLogin"]; + [[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].sendInfo boolValue] forKey:@"sendInfo"]; + [[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].helpHidden boolValue] forKey:@"helpHidden"]; + [[Crashlytics sharedInstance] setBoolValue:[[MPiOSConfig get].showSetup boolValue] forKey:@"showQuickStart"]; + [[Crashlytics sharedInstance] setBoolValue:[[PearlConfig get].firstRun boolValue] forKey:@"firstRun"]; + [[Crashlytics sharedInstance] setIntValue:[[PearlConfig get].launchCount intValue] forKey:@"launchCount"]; + [[Crashlytics sharedInstance] setBoolValue:[[PearlConfig get].askForReviews boolValue] forKey:@"askForReviews"]; + [[Crashlytics sharedInstance] setIntValue:[[PearlConfig get].reviewAfterLaunches intValue] forKey:@"reviewAfterLaunches"]; + [[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 - - 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 ) - } ); } } diff --git a/MasterPassword/Resources/Media/ios/icon.sketch b/MasterPassword/Resources/Media/ios/icon.sketch new file mode 100644 index 00000000..87c88d12 Binary files /dev/null and b/MasterPassword/Resources/Media/ios/icon.sketch differ