From 416a1715282ddd6d5a27afbb786ea8c7a2c3d2f2 Mon Sep 17 00:00:00 2001 From: Lucas Werey <73439207+LucasWerey@users.noreply.github.com> Date: Tue, 19 Nov 2024 14:39:43 +0100 Subject: [PATCH] Revert ":bug:(llm) fix splashscreen (#8382)" (#8399) This reverts commit eda204261f30e5a4784ed9af1376f64d8d86155e. --- .changeset/blue-files-train.md | 5 ---- .../ios/LaunchScreen.storyboard | 4 +-- .../ios/ledgerlivemobile/AppDelegate.mm | 26 ++++++++++--------- 3 files changed, 16 insertions(+), 19 deletions(-) delete mode 100644 .changeset/blue-files-train.md diff --git a/.changeset/blue-files-train.md b/.changeset/blue-files-train.md deleted file mode 100644 index e203dbd0d28a..000000000000 --- a/.changeset/blue-files-train.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"live-mobile": minor ---- - -Fix splashscreen on launch diff --git a/apps/ledger-live-mobile/ios/LaunchScreen.storyboard b/apps/ledger-live-mobile/ios/LaunchScreen.storyboard index a2325a660511..6a4050ab1668 100644 --- a/apps/ledger-live-mobile/ios/LaunchScreen.storyboard +++ b/apps/ledger-live-mobile/ios/LaunchScreen.storyboard @@ -1,9 +1,9 @@ - + - + diff --git a/apps/ledger-live-mobile/ios/ledgerlivemobile/AppDelegate.mm b/apps/ledger-live-mobile/ios/ledgerlivemobile/AppDelegate.mm index c129fb85c627..ce0b0223e7d3 100644 --- a/apps/ledger-live-mobile/ios/ledgerlivemobile/AppDelegate.mm +++ b/apps/ledger-live-mobile/ios/ledgerlivemobile/AppDelegate.mm @@ -22,7 +22,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( // You can add your custom initial props in the dictionary below. // They will be passed down to the ViewController used by React Native. self.initialProps = @{}; - + RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge moduleName:@"ledgerlivemobile" @@ -32,16 +32,16 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( // Retrieve the correct GoogleService-Info.plist file name for a given environment NSString *googleServiceInfoEnvName = [RNCConfig envFor:@"GOOGLE_SERVICE_INFO_NAME"]; NSString *googleServiceInfoName = googleServiceInfoEnvName; - + if ([googleServiceInfoName length] == 0) { googleServiceInfoName = @"GoogleService-Info"; } - + // Initialize Firebase with the correct GoogleService-Info.plist file NSString *filePath = [[NSBundle mainBundle] pathForResource:googleServiceInfoName ofType:@"plist"]; FIROptions *options = [[FIROptions alloc] initWithContentsOfFile:filePath]; [FIRApp configureWithOptions:options]; - + // Setup Braze NSString *brazeApiKeyFromEnv = [RNCConfig envFor:@"BRAZE_IOS_API_KEY"]; NSString *brazeCustomEndpointFromEnv = [RNCConfig envFor:@"BRAZE_CUSTOM_ENDPOINT"]; @@ -72,12 +72,14 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( } [[BrazeReactUtils sharedInstance] populateInitialUrlFromLaunchOptions:launchOptions]; - + [self.window makeKeyAndVisible]; - + UIStoryboard *sb = [UIStoryboard storyboardWithName:@"LaunchScreen" bundle:nil]; + UIViewController *vc = [sb instantiateInitialViewController]; + rootView.loadingView = vc.view; + [super application:application didFinishLaunchingWithOptions:launchOptions]; - [RNSplashScreen show]; - + return YES; } @@ -145,23 +147,23 @@ - (void) showOverlay{ blurEffectView.frame = [self.window bounds]; blurEffectView.tag = 12345; logoView.tag = 12346; - + blurEffectView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; [self.window addSubview:blurEffectView]; [self.window addSubview:logoView]; [self.window bringSubviewToFront:logoView]; - + [logoView setContentHuggingPriority:251 forAxis:UILayoutConstraintAxisHorizontal]; [logoView setContentHuggingPriority:251 forAxis:UILayoutConstraintAxisVertical]; logoView.frame = CGRectMake(0, 0, 128, 128); - + logoView.center = CGPointMake(self.window.frame.size.width / 2,self.window.frame.size.height / 2); } - (void) hideOverlay{ UIView *blurEffectView = [self.window viewWithTag:12345]; UIView *logoView = [self.window viewWithTag:12346]; - + [UIView animateWithDuration:0.5 animations:^{ blurEffectView.alpha = 0; logoView.alpha = 0;