diff --git a/platform-darwin/External/Pearl b/platform-darwin/External/Pearl index 72de3d1b..e3a985ac 160000 --- a/platform-darwin/External/Pearl +++ b/platform-darwin/External/Pearl @@ -1 +1 @@ -Subproject commit 72de3d1b49b4a9c9cd86f865f7a1c3da18fbc582 +Subproject commit e3a985accf5101e98f16ce76d0669bbee3db5b31 diff --git a/platform-darwin/MasterPassword-iOS.xcodeproj/xcshareddata/xcschemes/MasterPassword iOS.xcscheme b/platform-darwin/MasterPassword-iOS.xcodeproj/xcshareddata/xcschemes/MasterPassword iOS.xcscheme index cc454100..6a09adfa 100644 --- a/platform-darwin/MasterPassword-iOS.xcodeproj/xcshareddata/xcschemes/MasterPassword iOS.xcscheme +++ b/platform-darwin/MasterPassword-iOS.xcodeproj/xcshareddata/xcschemes/MasterPassword iOS.xcscheme @@ -73,6 +73,13 @@ identifier = "com.apple.dt.IDEFoundation.CurrentLocationScenarioIdentifier" referenceType = "1"> + + + + + + + + + + + + + + + + + + + + + + + + + + redacted = !revealPasswords; exportUser->avatar = (unsigned int)user.avatar; exportUser->keyID = mpw_strdup( [user.keyID encodeHex].UTF8String ); diff --git a/platform-darwin/Source/Mac/MPMacAppDelegate.m b/platform-darwin/Source/Mac/MPMacAppDelegate.m index 760f0fab..7a11a5e9 100644 --- a/platform-darwin/Source/Mac/MPMacAppDelegate.m +++ b/platform-darwin/Source/Mac/MPMacAppDelegate.m @@ -68,7 +68,7 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven @try { // Sentry - [SentrySDK initWithOptions:@{ + [SentrySDK startWithOptions:@{ @"dsn" : NilToNSNull( decrypt( sentryDSN ) ), #ifdef DEBUG @"debug" : @(YES), @@ -80,7 +80,7 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven @"debug" : @(NO), @"environment" : @"Private", #endif - @"enabled" : [MPMacConfig get].sendInfo, + @"enabled" : @([[MPMacConfig get].sendInfo boolValue] || ![[MPMacConfig get].sendInfoDecided boolValue]), @"enableAutoSessionTracking": @(YES), }]; [[PearlLogger get] registerListener:^BOOL(PearlLogMessage *message) { diff --git a/platform-darwin/Source/iOS/MPSiteCell.m b/platform-darwin/Source/iOS/MPSiteCell.m index 98eba5c8..7b086666 100644 --- a/platform-darwin/Source/iOS/MPSiteCell.m +++ b/platform-darwin/Source/iOS/MPSiteCell.m @@ -263,6 +263,7 @@ UIAlertController *controller = [UIAlertController alertControllerWithTitle:strf( @"Delete %@?", site.name ) message:nil preferredStyle:UIAlertControllerStyleActionSheet]; + [controller.popoverPresentationController setSourceView:sender]; [controller addAction:[UIAlertAction actionWithTitle:@"Delete Site" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *_Nonnull action) { [MPiOSAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *context) { @@ -284,6 +285,7 @@ MPSiteEntity *mainSite = [self siteInContext:[MPiOSAppDelegate managedObjectContextForMainThreadIfReady]]; UIAlertController *controller = [UIAlertController alertControllerWithTitle:@"Change Password Type" message:nil preferredStyle:UIAlertControllerStyleActionSheet]; + [controller.popoverPresentationController setSourceView:sender]; for (NSNumber *typeNumber in [mainSite.algorithm allTypes]) { MPResultType type = (MPResultType)[typeNumber unsignedIntegerValue]; NSString *typeName = [mainSite.algorithm nameOfType:type]; @@ -425,7 +427,7 @@ if (!site || ![site isKindOfClass:[MPGeneratedSiteEntity class]]) return; - ((MPGeneratedSiteEntity *)site).counter = 1; + ((MPGeneratedSiteEntity *)site).counter = MPCounterValueInitial; [context saveToStore]; [PearlOverlay showTemporaryOverlayWithTitle:@"Counter Reset" dismissAfter:2]; @@ -444,6 +446,7 @@ UIAlertController *controller = [UIAlertController alertControllerWithTitle:@"Create Site" message: strf( @"Remember site named:\n%@", self.transientSite ) preferredStyle:UIAlertControllerStyleActionSheet]; + [controller.popoverPresentationController setSourceView:sender]; [controller addAction:[UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDefault handler: ^(UIAlertAction *_Nonnull action) { [[MPiOSAppDelegate get] diff --git a/platform-darwin/Source/iOS/MPUsersViewController.m b/platform-darwin/Source/iOS/MPUsersViewController.m index dcbb928a..6f659f9c 100644 --- a/platform-darwin/Source/iOS/MPUsersViewController.m +++ b/platform-darwin/Source/iOS/MPUsersViewController.m @@ -432,6 +432,7 @@ referenceSizeForFooterInSection:(NSInteger)section { NSManagedObjectID *userID = user.permanentObjectID; UIAlertController *controller = [UIAlertController alertControllerWithTitle:user.name message:nil preferredStyle:UIAlertControllerStyleActionSheet]; + [controller.popoverPresentationController setSourceView:avatarCell]; [controller addAction:[UIAlertAction actionWithTitle:@"Delete User" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) { UIAlertController *controller_ = [UIAlertController alertControllerWithTitle:@"Deleting User" message: @"The user and its sites will be deleted." preferredStyle:UIAlertControllerStyleAlert]; diff --git a/platform-darwin/Source/iOS/MPiOSAppDelegate.m b/platform-darwin/Source/iOS/MPiOSAppDelegate.m index 414ec17a..333dbfb5 100644 --- a/platform-darwin/Source/iOS/MPiOSAppDelegate.m +++ b/platform-darwin/Source/iOS/MPiOSAppDelegate.m @@ -57,7 +57,7 @@ @try { // Sentry - [SentrySDK initWithOptions:@{ + [SentrySDK startWithOptions:@{ @"dsn" : NilToNSNull( decrypt( sentryDSN ) ), #ifdef DEBUG @"debug" : @(YES), @@ -69,7 +69,7 @@ @"debug" : @(NO), @"environment" : @"Private", #endif - @"enabled" : [MPiOSConfig get].sendInfo, + @"enabled" : @([[MPiOSConfig get].sendInfo boolValue] || ![[MPiOSConfig get].sendInfoDecided boolValue]), @"enableAutoSessionTracking": @(YES), }]; [[PearlLogger get] registerListener:^BOOL(PearlLogMessage *message) { @@ -598,7 +598,7 @@ @"Would you like to make all your passwords visible in the export file?\n\n" @"A safe export will include all sites but make their passwords invisible.\n" @"It is great as a backup and remains safe when fallen in the wrong hands." - preferredStyle:UIAlertControllerStyleActionSheet]; + preferredStyle:UIAlertControllerStyleAlert]; [sheet addAction:[UIAlertAction actionWithTitle:@"Safe Export" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { [self showExportRevealPasswords:NO forVC:viewController]; }]]; @@ -647,14 +647,15 @@ } error:&error]; PearlMainQueue( ^{ - if (!exportedUser || error) { + if (error) { MPError( error, @"Failed to export mpsites." ); UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Export Error" message:[error localizedDescription] preferredStyle:UIAlertControllerStyleAlert]; [alert addAction:[UIAlertAction actionWithTitle:@"Okay" style:UIAlertActionStyleCancel handler:nil]]; [self.navigationController presentViewController:alert animated:YES completion:nil]; - return; } + if (!exportedUser) + return; NSDateFormatter *exportDateFormatter = [NSDateFormatter new]; [exportDateFormatter setDateFormat:@"yyyy'-'MM'-'dd"]; @@ -662,7 +663,7 @@ [self activeUserForMainThread].name, [exportDateFormatter stringFromDate:[NSDate date]] ); UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Export Destination" message:nil - preferredStyle:UIAlertControllerStyleActionSheet]; + preferredStyle:UIAlertControllerStyleAlert]; [alert addAction:[UIAlertAction actionWithTitle:@"Send As E-Mail" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { NSString *message; if (revealPasswords) @@ -724,7 +725,7 @@ UIAlertController *usersSheet = [UIAlertController alertControllerWithTitle:@"Migrate User" message:@"Choose a user to migrate out to Volto." - preferredStyle:UIAlertControllerStyleActionSheet]; + preferredStyle:UIAlertControllerStyleAlert]; [usersSheet addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]]; for (MPUserEntity *user_ in users) [usersSheet addAction:[UIAlertAction actionWithTitle:user_.name style:UIAlertActionStyleDefault handler: @@ -759,15 +760,16 @@ } error:&error]; PearlMainQueue( ^{ - if (!exportedUser || error) { + if (error) { MPError( error, @"Failed to export user." ); UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Export Error" message:[error localizedDescription] preferredStyle:UIAlertControllerStyleAlert]; [alert addAction:[UIAlertAction actionWithTitle:@"Okay" style:UIAlertActionStyleCancel handler:nil]]; [self.navigationController presentViewController:alert animated:YES completion:nil]; - return; } + if (!exportedUser) + return; NSURLComponents *components = [NSURLComponents new]; components.scheme = @"volto";