Skip to content

Commit

Permalink
Revert ":bug:(llm) fix splashscreen (#8382)" (#8399)
Browse files Browse the repository at this point in the history
This reverts commit eda2042.
  • Loading branch information
LucasWerey authored Nov 19, 2024
1 parent a49dfee commit 416a171
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 19 deletions.
5 changes: 0 additions & 5 deletions .changeset/blue-files-train.md

This file was deleted.

4 changes: 2 additions & 2 deletions apps/ledger-live-mobile/ios/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Y6W-OH-hqX">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Y6W-OH-hqX">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
Expand Down
26 changes: 14 additions & 12 deletions apps/ledger-live-mobile/ios/ledgerlivemobile/AppDelegate.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"];
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 416a171

Please sign in to comment.