Skip to content

Commit 90a9572

Browse files
authored
docs: remove outdated Objective-C splash screen setup code (#4911)
Remove the Objective-C code snippet for handling splash screen transitions from the "Publishing to Apple App Store" documentation. Since React Native 0.71+, new projects generate `AppDelegate.swift` by default, making the Objective-C code referencing `AppDelegate.m` and `[self.window makeKeyAndVisible]` incompatible with modern projects. The `LaunchScreen.storyboard` typically handles the splash screen automatically for most use cases, and developers experiencing the white flash issue should consider using community libraries like `react-native-bootsplash` which have proper Swift support. Fixes #4770
1 parent e126fd8 commit 90a9572

File tree

7 files changed

+0
-63
lines changed

7 files changed

+0
-63
lines changed

docs/publishing-to-app-store.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ To configure your app to be built using the `Release` scheme, go to **Product**
1919

2020
#### Pro Tips
2121

22-
As your App Bundle grows in size, you may start to see a blank screen flash between your splash screen and the display of your root application view. If this is the case, you can add the following code to `AppDelegate.m` in order to keep your splash screen displayed during the transition.
23-
24-
```objectivec
25-
// Place this code after "[self.window makeKeyAndVisible]" and before "return YES;"
26-
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"LaunchScreen" bundle:nil];
27-
UIViewController *vc = [sb instantiateInitialViewController];
28-
rootView.loadingView = vc.view;
29-
```
30-
3122
The static bundle is built every time you target a physical device, even in Debug. If you want to save time, turn off bundle generation in Debug by adding the following to your shell script in the Xcode Build Phase `Bundle React Native code and images`:
3223

3324
```shell

website/versioned_docs/version-0.77/publishing-to-app-store.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ To configure your app to be built using the `Release` scheme, go to **Product**
1919

2020
#### Pro Tips
2121

22-
As your App Bundle grows in size, you may start to see a blank screen flash between your splash screen and the display of your root application view. If this is the case, you can add the following code to `AppDelegate.m` in order to keep your splash screen displayed during the transition.
23-
24-
```objectivec
25-
// Place this code after "[self.window makeKeyAndVisible]" and before "return YES;"
26-
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"LaunchScreen" bundle:nil];
27-
UIViewController *vc = [sb instantiateInitialViewController];
28-
rootView.loadingView = vc.view;
29-
```
30-
3122
The static bundle is built every time you target a physical device, even in Debug. If you want to save time, turn off bundle generation in Debug by adding the following to your shell script in the Xcode Build Phase `Bundle React Native code and images`:
3223

3324
```shell

website/versioned_docs/version-0.78/publishing-to-app-store.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ To configure your app to be built using the `Release` scheme, go to **Product**
1919

2020
#### Pro Tips
2121

22-
As your App Bundle grows in size, you may start to see a blank screen flash between your splash screen and the display of your root application view. If this is the case, you can add the following code to `AppDelegate.m` in order to keep your splash screen displayed during the transition.
23-
24-
```objectivec
25-
// Place this code after "[self.window makeKeyAndVisible]" and before "return YES;"
26-
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"LaunchScreen" bundle:nil];
27-
UIViewController *vc = [sb instantiateInitialViewController];
28-
rootView.loadingView = vc.view;
29-
```
30-
3122
The static bundle is built every time you target a physical device, even in Debug. If you want to save time, turn off bundle generation in Debug by adding the following to your shell script in the Xcode Build Phase `Bundle React Native code and images`:
3223

3324
```shell

website/versioned_docs/version-0.79/publishing-to-app-store.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ To configure your app to be built using the `Release` scheme, go to **Product**
1919

2020
#### Pro Tips
2121

22-
As your App Bundle grows in size, you may start to see a blank screen flash between your splash screen and the display of your root application view. If this is the case, you can add the following code to `AppDelegate.m` in order to keep your splash screen displayed during the transition.
23-
24-
```objectivec
25-
// Place this code after "[self.window makeKeyAndVisible]" and before "return YES;"
26-
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"LaunchScreen" bundle:nil];
27-
UIViewController *vc = [sb instantiateInitialViewController];
28-
rootView.loadingView = vc.view;
29-
```
30-
3122
The static bundle is built every time you target a physical device, even in Debug. If you want to save time, turn off bundle generation in Debug by adding the following to your shell script in the Xcode Build Phase `Bundle React Native code and images`:
3223

3324
```shell

website/versioned_docs/version-0.80/publishing-to-app-store.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ To configure your app to be built using the `Release` scheme, go to **Product**
1919

2020
#### Pro Tips
2121

22-
As your App Bundle grows in size, you may start to see a blank screen flash between your splash screen and the display of your root application view. If this is the case, you can add the following code to `AppDelegate.m` in order to keep your splash screen displayed during the transition.
23-
24-
```objectivec
25-
// Place this code after "[self.window makeKeyAndVisible]" and before "return YES;"
26-
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"LaunchScreen" bundle:nil];
27-
UIViewController *vc = [sb instantiateInitialViewController];
28-
rootView.loadingView = vc.view;
29-
```
30-
3122
The static bundle is built every time you target a physical device, even in Debug. If you want to save time, turn off bundle generation in Debug by adding the following to your shell script in the Xcode Build Phase `Bundle React Native code and images`:
3223

3324
```shell

website/versioned_docs/version-0.81/publishing-to-app-store.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ To configure your app to be built using the `Release` scheme, go to **Product**
1919

2020
#### Pro Tips
2121

22-
As your App Bundle grows in size, you may start to see a blank screen flash between your splash screen and the display of your root application view. If this is the case, you can add the following code to `AppDelegate.m` in order to keep your splash screen displayed during the transition.
23-
24-
```objectivec
25-
// Place this code after "[self.window makeKeyAndVisible]" and before "return YES;"
26-
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"LaunchScreen" bundle:nil];
27-
UIViewController *vc = [sb instantiateInitialViewController];
28-
rootView.loadingView = vc.view;
29-
```
30-
3122
The static bundle is built every time you target a physical device, even in Debug. If you want to save time, turn off bundle generation in Debug by adding the following to your shell script in the Xcode Build Phase `Bundle React Native code and images`:
3223

3324
```shell

website/versioned_docs/version-0.82/publishing-to-app-store.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ To configure your app to be built using the `Release` scheme, go to **Product**
1919

2020
#### Pro Tips
2121

22-
As your App Bundle grows in size, you may start to see a blank screen flash between your splash screen and the display of your root application view. If this is the case, you can add the following code to `AppDelegate.m` in order to keep your splash screen displayed during the transition.
23-
24-
```objectivec
25-
// Place this code after "[self.window makeKeyAndVisible]" and before "return YES;"
26-
UIStoryboard *sb = [UIStoryboard storyboardWithName:@"LaunchScreen" bundle:nil];
27-
UIViewController *vc = [sb instantiateInitialViewController];
28-
rootView.loadingView = vc.view;
29-
```
30-
3122
The static bundle is built every time you target a physical device, even in Debug. If you want to save time, turn off bundle generation in Debug by adding the following to your shell script in the Xcode Build Phase `Bundle React Native code and images`:
3223

3324
```shell

0 commit comments

Comments
 (0)