From 57f275c4716c2a2b37183ee124db409fe2ba6a44 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Wed, 2 Sep 2020 16:40:41 -0400 Subject: [PATCH] Update for Xcode 12 & add device identifier to UI. --- platform-darwin/External/Pearl | 2 +- .../Source/iOS/MPEmergencyViewController.h | 2 + .../Source/iOS/MPEmergencyViewController.m | 7 ++ .../Source/iOS/Storyboard.storyboard | 94 ++++++++++++------- 4 files changed, 71 insertions(+), 34 deletions(-) diff --git a/platform-darwin/External/Pearl b/platform-darwin/External/Pearl index d5f7dd7e..b5471c66 160000 --- a/platform-darwin/External/Pearl +++ b/platform-darwin/External/Pearl @@ -1 +1 @@ -Subproject commit d5f7dd7eba18d70b6fec7aa81654113c9b6feda7 +Subproject commit b5471c66b890d440151a15a57c38e8074e64e019 diff --git a/platform-darwin/Source/iOS/MPEmergencyViewController.h b/platform-darwin/Source/iOS/MPEmergencyViewController.h index 473cf11d..1a508542 100644 --- a/platform-darwin/Source/iOS/MPEmergencyViewController.h +++ b/platform-darwin/Source/iOS/MPEmergencyViewController.h @@ -30,8 +30,10 @@ @property(weak, nonatomic) IBOutlet UIActivityIndicatorView *activity; @property(weak, nonatomic) IBOutlet UIButton *passwordButton; @property(weak, nonatomic) IBOutlet UIView *tipContainer; +@property(weak, nonatomic) IBOutlet UIButton *deviceButton; - (IBAction)controlChanged:(UIControl *)control; - (IBAction)copyPassword:(UITapGestureRecognizer *)recognizer; +- (IBAction)copyDevice:(id)sender; @end diff --git a/platform-darwin/Source/iOS/MPEmergencyViewController.m b/platform-darwin/Source/iOS/MPEmergencyViewController.m index b4ce327d..df7e76e5 100644 --- a/platform-darwin/Source/iOS/MPEmergencyViewController.m +++ b/platform-darwin/Source/iOS/MPEmergencyViewController.m @@ -38,6 +38,8 @@ self.view.backgroundColor = [UIColor clearColor]; self.dialogView.layer.cornerRadius = 5; + + [self.deviceButton setTitle:[PearlKeyChain deviceIdentifier] forState:UIControlStateNormal]; } - (void)viewWillAppear:(BOOL)animated { @@ -112,6 +114,11 @@ }]; } +- (IBAction)copyDevice:(id)sender { + [UIPasteboard generalPasteboard].string = [PearlKeyChain deviceIdentifier]; + [PearlOverlay showTemporaryOverlayWithTitle:strl( @"Device Identifier Copied" ) dismissAfter:2]; +} + #pragma mark - Private - (void)updateKey { diff --git a/platform-darwin/Source/iOS/Storyboard.storyboard b/platform-darwin/Source/iOS/Storyboard.storyboard index 25ea7f51..abb822e2 100644 --- a/platform-darwin/Source/iOS/Storyboard.storyboard +++ b/platform-darwin/Source/iOS/Storyboard.storyboard @@ -1,9 +1,9 @@ - + - + @@ -164,7 +164,7 @@ - - - - - - - + @@ -2056,14 +2056,41 @@ This app is now out of maintenance. + + + + + + + + + + @@ -2078,6 +2105,7 @@ This app is now out of maintenance. + @@ -2119,10 +2147,10 @@ This app is now out of maintenance. - + - + @@ -2132,7 +2160,7 @@ This app is now out of maintenance. - + @@ -2161,13 +2189,13 @@ This app is now out of maintenance. - -