iPad fixes & log initial start-up crashes.
This commit is contained in:
parent
3fa7e1e8a1
commit
3bac8d9e0a
2
platform-darwin/External/Pearl
vendored
2
platform-darwin/External/Pearl
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 72de3d1b49b4a9c9cd86f865f7a1c3da18fbc582
|
Subproject commit e3a985accf5101e98f16ce76d0669bbee3db5b31
|
@ -73,6 +73,13 @@
|
|||||||
identifier = "com.apple.dt.IDEFoundation.CurrentLocationScenarioIdentifier"
|
identifier = "com.apple.dt.IDEFoundation.CurrentLocationScenarioIdentifier"
|
||||||
referenceType = "1">
|
referenceType = "1">
|
||||||
</LocationScenarioReference>
|
</LocationScenarioReference>
|
||||||
|
<EnvironmentVariables>
|
||||||
|
<EnvironmentVariable
|
||||||
|
key = "TERM"
|
||||||
|
value = "color"
|
||||||
|
isEnabled = "YES">
|
||||||
|
</EnvironmentVariable>
|
||||||
|
</EnvironmentVariables>
|
||||||
</LaunchAction>
|
</LaunchAction>
|
||||||
<ProfileAction
|
<ProfileAction
|
||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Debug"
|
||||||
|
@ -59,6 +59,17 @@
|
|||||||
ReferencedContainer = "container:MasterPassword-macOS.xcodeproj">
|
ReferencedContainer = "container:MasterPassword-macOS.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildableProductRunnable>
|
</BuildableProductRunnable>
|
||||||
|
<EnvironmentVariables>
|
||||||
|
<EnvironmentVariable
|
||||||
|
key = "TERM"
|
||||||
|
value = "color"
|
||||||
|
isEnabled = "YES">
|
||||||
|
</EnvironmentVariable>
|
||||||
|
</EnvironmentVariables>
|
||||||
|
<LocationScenarioReference
|
||||||
|
identifier = "com.apple.dt.IDEFoundation.CurrentLocationScenarioIdentifier"
|
||||||
|
referenceType = "1">
|
||||||
|
</LocationScenarioReference>
|
||||||
</LaunchAction>
|
</LaunchAction>
|
||||||
<ProfileAction
|
<ProfileAction
|
||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Debug"
|
||||||
|
@ -59,6 +59,17 @@
|
|||||||
ReferencedContainer = "container:MasterPassword-macOS.xcodeproj">
|
ReferencedContainer = "container:MasterPassword-macOS.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildableProductRunnable>
|
</BuildableProductRunnable>
|
||||||
|
<EnvironmentVariables>
|
||||||
|
<EnvironmentVariable
|
||||||
|
key = "TERM"
|
||||||
|
value = "color"
|
||||||
|
isEnabled = "YES">
|
||||||
|
</EnvironmentVariable>
|
||||||
|
</EnvironmentVariables>
|
||||||
|
<LocationScenarioReference
|
||||||
|
identifier = "com.apple.dt.IDEFoundation.CurrentLocationScenarioIdentifier"
|
||||||
|
referenceType = "1">
|
||||||
|
</LocationScenarioReference>
|
||||||
</LaunchAction>
|
</LaunchAction>
|
||||||
<ProfileAction
|
<ProfileAction
|
||||||
buildConfiguration = "Release"
|
buildConfiguration = "Release"
|
||||||
|
@ -85,6 +85,13 @@
|
|||||||
identifier = "com.apple.dt.IDEFoundation.CurrentLocationScenarioIdentifier"
|
identifier = "com.apple.dt.IDEFoundation.CurrentLocationScenarioIdentifier"
|
||||||
referenceType = "1">
|
referenceType = "1">
|
||||||
</LocationScenarioReference>
|
</LocationScenarioReference>
|
||||||
|
<EnvironmentVariables>
|
||||||
|
<EnvironmentVariable
|
||||||
|
key = "TERM"
|
||||||
|
value = "color"
|
||||||
|
isEnabled = "YES">
|
||||||
|
</EnvironmentVariable>
|
||||||
|
</EnvironmentVariables>
|
||||||
</LaunchAction>
|
</LaunchAction>
|
||||||
<ProfileAction
|
<ProfileAction
|
||||||
buildConfiguration = "Release"
|
buildConfiguration = "Release"
|
||||||
|
@ -60,6 +60,17 @@
|
|||||||
ReferencedContainer = "container:MasterPassword-macOS.xcodeproj">
|
ReferencedContainer = "container:MasterPassword-macOS.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
</BuildableProductRunnable>
|
</BuildableProductRunnable>
|
||||||
|
<EnvironmentVariables>
|
||||||
|
<EnvironmentVariable
|
||||||
|
key = "TERM"
|
||||||
|
value = "color"
|
||||||
|
isEnabled = "YES">
|
||||||
|
</EnvironmentVariable>
|
||||||
|
</EnvironmentVariables>
|
||||||
|
<LocationScenarioReference
|
||||||
|
identifier = "com.apple.dt.IDEFoundation.CurrentLocationScenarioIdentifier"
|
||||||
|
referenceType = "1">
|
||||||
|
</LocationScenarioReference>
|
||||||
</LaunchAction>
|
</LaunchAction>
|
||||||
<ProfileAction
|
<ProfileAction
|
||||||
buildConfiguration = "Debug"
|
buildConfiguration = "Debug"
|
||||||
|
@ -713,8 +713,14 @@ PearlAssociatedObjectProperty( NSNumber*, StoreCorrupted, storeCorrupted );
|
|||||||
MPMarshalledFile *exportFile = NULL;
|
MPMarshalledFile *exportFile = NULL;
|
||||||
@try {
|
@try {
|
||||||
inf( @"Exporting sites, %@, for user: %@", revealPasswords? @"revealing passwords": @"omitting passwords", user.userID );
|
inf( @"Exporting sites, %@, for user: %@", revealPasswords? @"revealing passwords": @"omitting passwords", user.userID );
|
||||||
|
NSString *masterPassword = askExportPassword( user.name );
|
||||||
|
if (!masterPassword) {
|
||||||
|
inf( @"Export cancelled." );
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
exportUser = mpw_marshal_user( user.name.UTF8String,
|
exportUser = mpw_marshal_user( user.name.UTF8String,
|
||||||
mpw_masterKeyProvider_str( askExportPassword( user.name ).UTF8String ), user.algorithm.version );
|
mpw_masterKeyProvider_str( masterPassword.UTF8String ), user.algorithm.version );
|
||||||
exportUser->redacted = !revealPasswords;
|
exportUser->redacted = !revealPasswords;
|
||||||
exportUser->avatar = (unsigned int)user.avatar;
|
exportUser->avatar = (unsigned int)user.avatar;
|
||||||
exportUser->keyID = mpw_strdup( [user.keyID encodeHex].UTF8String );
|
exportUser->keyID = mpw_strdup( [user.keyID encodeHex].UTF8String );
|
||||||
|
@ -68,7 +68,7 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
|||||||
|
|
||||||
@try {
|
@try {
|
||||||
// Sentry
|
// Sentry
|
||||||
[SentrySDK initWithOptions:@{
|
[SentrySDK startWithOptions:@{
|
||||||
@"dsn" : NilToNSNull( decrypt( sentryDSN ) ),
|
@"dsn" : NilToNSNull( decrypt( sentryDSN ) ),
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@"debug" : @(YES),
|
@"debug" : @(YES),
|
||||||
@ -80,7 +80,7 @@ static OSStatus MPHotKeyHander(EventHandlerCallRef nextHandler, EventRef theEven
|
|||||||
@"debug" : @(NO),
|
@"debug" : @(NO),
|
||||||
@"environment" : @"Private",
|
@"environment" : @"Private",
|
||||||
#endif
|
#endif
|
||||||
@"enabled" : [MPMacConfig get].sendInfo,
|
@"enabled" : @([[MPMacConfig get].sendInfo boolValue] || ![[MPMacConfig get].sendInfoDecided boolValue]),
|
||||||
@"enableAutoSessionTracking": @(YES),
|
@"enableAutoSessionTracking": @(YES),
|
||||||
}];
|
}];
|
||||||
[[PearlLogger get] registerListener:^BOOL(PearlLogMessage *message) {
|
[[PearlLogger get] registerListener:^BOOL(PearlLogMessage *message) {
|
||||||
|
@ -263,6 +263,7 @@
|
|||||||
|
|
||||||
UIAlertController *controller = [UIAlertController alertControllerWithTitle:strf( @"Delete %@?", site.name ) message:nil
|
UIAlertController *controller = [UIAlertController alertControllerWithTitle:strf( @"Delete %@?", site.name ) message:nil
|
||||||
preferredStyle:UIAlertControllerStyleActionSheet];
|
preferredStyle:UIAlertControllerStyleActionSheet];
|
||||||
|
[controller.popoverPresentationController setSourceView:sender];
|
||||||
[controller addAction:[UIAlertAction actionWithTitle:@"Delete Site" style:UIAlertActionStyleDestructive
|
[controller addAction:[UIAlertAction actionWithTitle:@"Delete Site" style:UIAlertActionStyleDestructive
|
||||||
handler:^(UIAlertAction *_Nonnull action) {
|
handler:^(UIAlertAction *_Nonnull action) {
|
||||||
[MPiOSAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *context) {
|
[MPiOSAppDelegate managedObjectContextPerformBlock:^(NSManagedObjectContext *context) {
|
||||||
@ -284,6 +285,7 @@
|
|||||||
MPSiteEntity *mainSite = [self siteInContext:[MPiOSAppDelegate managedObjectContextForMainThreadIfReady]];
|
MPSiteEntity *mainSite = [self siteInContext:[MPiOSAppDelegate managedObjectContextForMainThreadIfReady]];
|
||||||
UIAlertController *controller = [UIAlertController alertControllerWithTitle:@"Change Password Type" message:nil
|
UIAlertController *controller = [UIAlertController alertControllerWithTitle:@"Change Password Type" message:nil
|
||||||
preferredStyle:UIAlertControllerStyleActionSheet];
|
preferredStyle:UIAlertControllerStyleActionSheet];
|
||||||
|
[controller.popoverPresentationController setSourceView:sender];
|
||||||
for (NSNumber *typeNumber in [mainSite.algorithm allTypes]) {
|
for (NSNumber *typeNumber in [mainSite.algorithm allTypes]) {
|
||||||
MPResultType type = (MPResultType)[typeNumber unsignedIntegerValue];
|
MPResultType type = (MPResultType)[typeNumber unsignedIntegerValue];
|
||||||
NSString *typeName = [mainSite.algorithm nameOfType:type];
|
NSString *typeName = [mainSite.algorithm nameOfType:type];
|
||||||
@ -425,7 +427,7 @@
|
|||||||
if (!site || ![site isKindOfClass:[MPGeneratedSiteEntity class]])
|
if (!site || ![site isKindOfClass:[MPGeneratedSiteEntity class]])
|
||||||
return;
|
return;
|
||||||
|
|
||||||
((MPGeneratedSiteEntity *)site).counter = 1;
|
((MPGeneratedSiteEntity *)site).counter = MPCounterValueInitial;
|
||||||
[context saveToStore];
|
[context saveToStore];
|
||||||
|
|
||||||
[PearlOverlay showTemporaryOverlayWithTitle:@"Counter Reset" dismissAfter:2];
|
[PearlOverlay showTemporaryOverlayWithTitle:@"Counter Reset" dismissAfter:2];
|
||||||
@ -444,6 +446,7 @@
|
|||||||
UIAlertController *controller = [UIAlertController alertControllerWithTitle:@"Create Site" message:
|
UIAlertController *controller = [UIAlertController alertControllerWithTitle:@"Create Site" message:
|
||||||
strf( @"Remember site named:\n%@", self.transientSite )
|
strf( @"Remember site named:\n%@", self.transientSite )
|
||||||
preferredStyle:UIAlertControllerStyleActionSheet];
|
preferredStyle:UIAlertControllerStyleActionSheet];
|
||||||
|
[controller.popoverPresentationController setSourceView:sender];
|
||||||
[controller addAction:[UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDefault handler:
|
[controller addAction:[UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDefault handler:
|
||||||
^(UIAlertAction *_Nonnull action) {
|
^(UIAlertAction *_Nonnull action) {
|
||||||
[[MPiOSAppDelegate get]
|
[[MPiOSAppDelegate get]
|
||||||
|
@ -432,6 +432,7 @@ referenceSizeForFooterInSection:(NSInteger)section {
|
|||||||
|
|
||||||
NSManagedObjectID *userID = user.permanentObjectID;
|
NSManagedObjectID *userID = user.permanentObjectID;
|
||||||
UIAlertController *controller = [UIAlertController alertControllerWithTitle:user.name message:nil preferredStyle:UIAlertControllerStyleActionSheet];
|
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) {
|
[controller addAction:[UIAlertAction actionWithTitle:@"Delete User" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) {
|
||||||
UIAlertController *controller_ = [UIAlertController alertControllerWithTitle:@"Deleting User" message:
|
UIAlertController *controller_ = [UIAlertController alertControllerWithTitle:@"Deleting User" message:
|
||||||
@"The user and its sites will be deleted." preferredStyle:UIAlertControllerStyleAlert];
|
@"The user and its sites will be deleted." preferredStyle:UIAlertControllerStyleAlert];
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
@try {
|
@try {
|
||||||
// Sentry
|
// Sentry
|
||||||
[SentrySDK initWithOptions:@{
|
[SentrySDK startWithOptions:@{
|
||||||
@"dsn" : NilToNSNull( decrypt( sentryDSN ) ),
|
@"dsn" : NilToNSNull( decrypt( sentryDSN ) ),
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@"debug" : @(YES),
|
@"debug" : @(YES),
|
||||||
@ -69,7 +69,7 @@
|
|||||||
@"debug" : @(NO),
|
@"debug" : @(NO),
|
||||||
@"environment" : @"Private",
|
@"environment" : @"Private",
|
||||||
#endif
|
#endif
|
||||||
@"enabled" : [MPiOSConfig get].sendInfo,
|
@"enabled" : @([[MPiOSConfig get].sendInfo boolValue] || ![[MPiOSConfig get].sendInfoDecided boolValue]),
|
||||||
@"enableAutoSessionTracking": @(YES),
|
@"enableAutoSessionTracking": @(YES),
|
||||||
}];
|
}];
|
||||||
[[PearlLogger get] registerListener:^BOOL(PearlLogMessage *message) {
|
[[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"
|
@"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"
|
@"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."
|
@"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) {
|
[sheet addAction:[UIAlertAction actionWithTitle:@"Safe Export" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||||
[self showExportRevealPasswords:NO forVC:viewController];
|
[self showExportRevealPasswords:NO forVC:viewController];
|
||||||
}]];
|
}]];
|
||||||
@ -647,14 +647,15 @@
|
|||||||
} error:&error];
|
} error:&error];
|
||||||
|
|
||||||
PearlMainQueue( ^{
|
PearlMainQueue( ^{
|
||||||
if (!exportedUser || error) {
|
if (error) {
|
||||||
MPError( error, @"Failed to export mpsites." );
|
MPError( error, @"Failed to export mpsites." );
|
||||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Export Error" message:[error localizedDescription]
|
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Export Error" message:[error localizedDescription]
|
||||||
preferredStyle:UIAlertControllerStyleAlert];
|
preferredStyle:UIAlertControllerStyleAlert];
|
||||||
[alert addAction:[UIAlertAction actionWithTitle:@"Okay" style:UIAlertActionStyleCancel handler:nil]];
|
[alert addAction:[UIAlertAction actionWithTitle:@"Okay" style:UIAlertActionStyleCancel handler:nil]];
|
||||||
[self.navigationController presentViewController:alert animated:YES completion:nil];
|
[self.navigationController presentViewController:alert animated:YES completion:nil];
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
if (!exportedUser)
|
||||||
|
return;
|
||||||
|
|
||||||
NSDateFormatter *exportDateFormatter = [NSDateFormatter new];
|
NSDateFormatter *exportDateFormatter = [NSDateFormatter new];
|
||||||
[exportDateFormatter setDateFormat:@"yyyy'-'MM'-'dd"];
|
[exportDateFormatter setDateFormat:@"yyyy'-'MM'-'dd"];
|
||||||
@ -662,7 +663,7 @@
|
|||||||
[self activeUserForMainThread].name, [exportDateFormatter stringFromDate:[NSDate date]] );
|
[self activeUserForMainThread].name, [exportDateFormatter stringFromDate:[NSDate date]] );
|
||||||
|
|
||||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Export Destination" message:nil
|
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) {
|
[alert addAction:[UIAlertAction actionWithTitle:@"Send As E-Mail" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
|
||||||
NSString *message;
|
NSString *message;
|
||||||
if (revealPasswords)
|
if (revealPasswords)
|
||||||
@ -724,7 +725,7 @@
|
|||||||
|
|
||||||
UIAlertController *usersSheet = [UIAlertController alertControllerWithTitle:@"Migrate User"
|
UIAlertController *usersSheet = [UIAlertController alertControllerWithTitle:@"Migrate User"
|
||||||
message:@"Choose a user to migrate out to Volto."
|
message:@"Choose a user to migrate out to Volto."
|
||||||
preferredStyle:UIAlertControllerStyleActionSheet];
|
preferredStyle:UIAlertControllerStyleAlert];
|
||||||
[usersSheet addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]];
|
[usersSheet addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]];
|
||||||
for (MPUserEntity *user_ in users)
|
for (MPUserEntity *user_ in users)
|
||||||
[usersSheet addAction:[UIAlertAction actionWithTitle:user_.name style:UIAlertActionStyleDefault handler:
|
[usersSheet addAction:[UIAlertAction actionWithTitle:user_.name style:UIAlertActionStyleDefault handler:
|
||||||
@ -759,15 +760,16 @@
|
|||||||
} error:&error];
|
} error:&error];
|
||||||
|
|
||||||
PearlMainQueue( ^{
|
PearlMainQueue( ^{
|
||||||
if (!exportedUser || error) {
|
if (error) {
|
||||||
MPError( error, @"Failed to export user." );
|
MPError( error, @"Failed to export user." );
|
||||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Export Error"
|
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Export Error"
|
||||||
message:[error localizedDescription]
|
message:[error localizedDescription]
|
||||||
preferredStyle:UIAlertControllerStyleAlert];
|
preferredStyle:UIAlertControllerStyleAlert];
|
||||||
[alert addAction:[UIAlertAction actionWithTitle:@"Okay" style:UIAlertActionStyleCancel handler:nil]];
|
[alert addAction:[UIAlertAction actionWithTitle:@"Okay" style:UIAlertActionStyleCancel handler:nil]];
|
||||||
[self.navigationController presentViewController:alert animated:YES completion:nil];
|
[self.navigationController presentViewController:alert animated:YES completion:nil];
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
if (!exportedUser)
|
||||||
|
return;
|
||||||
|
|
||||||
NSURLComponents *components = [NSURLComponents new];
|
NSURLComponents *components = [NSURLComponents new];
|
||||||
components.scheme = @"volto";
|
components.scheme = @"volto";
|
||||||
|
Loading…
Reference in New Issue
Block a user