File tree Expand file tree Collapse file tree 2 files changed +4
-16
lines changed
Expand file tree Collapse file tree 2 files changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ import UIKit
111111import React
112112import React_RCTAppDelegate
113113import ReactAppDependencyProvider
114- import react_native_splash_screen
114+ import react_native_splash_screen // <--- 添加react_native_splash_screen
115115
116116@main
117117class AppDelegate : UIResponder , UIApplicationDelegate {
@@ -136,7 +136,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
136136 in : window,
137137 launchOptions : launchOptions
138138 )
139- RNSplashScreen.show ()
139+ RNSplashScreen.show () // <--- 确保在 React Native 启动后调用
140140 return true
141141 }
142142}
@@ -167,12 +167,6 @@ class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
167167
168168Android 12+ always has a system-level splash phase. This is platform behavior. This library controls your in-app splash show/hide behavior.
169169
170- ### ` Cannot read property 'hide' of null `
171-
172- This usually means the native module did not load correctly:
173-
174- - Ensure React Native version is ` >= 0.84.0 `
175- - Reinstall dependencies and rebuild the app
176170
177171## Legacy
178172
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ import UIKit
111111import React
112112import React_RCTAppDelegate
113113import ReactAppDependencyProvider
114- import react_native_splash_screen
114+ import react_native_splash_screen // <--- 添加react_native_splash_screen
115115
116116@main
117117class AppDelegate : UIResponder , UIApplicationDelegate {
@@ -136,7 +136,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
136136 in : window,
137137 launchOptions : launchOptions
138138 )
139- RNSplashScreen.show ()
139+ RNSplashScreen.show () // <--- 确保在 React Native 启动后调用
140140 return true
141141 }
142142}
@@ -167,12 +167,6 @@ class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
167167
168168Android 12+ 存在系统级启动阶段,这是平台行为。本库控制的是应用内可控的启动页显示/隐藏。
169169
170- ### ` Cannot read property 'hide' of null `
171-
172- 通常是原生模块没有正确加载:
173-
174- - 确认 React Native 版本满足 ` >= 0.84.0 `
175- - 重新安装依赖并重新编译 App
176170
177171## Legacy 说明
178172
You can’t perform that action at this time.
0 commit comments