react-native-splash-screen: LaunchImage is not hiding in iOS
Hello,
On the android platform splash screen is working fine. But on the iOS platform, splash screen is not hiding. Please guide.
export default class Main extends Component {
componentDidMount() {
SplashScreen.hide();
}
render() {
return (
<View>
</View>
);
}
}
About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 13
- Comments: 38 (2 by maintainers)
The problem I was having was that I was calling
[SplashScreen show];too early in my AppDelegate. Make sure it’s after the call to[self.window makeKeyAndVisible];@ralcon I have deleted the ios directory in my project with
rm -rf ios, thanreact-native eject, afterreact-native link.This helped me and now everything is fine.
Mentioned here This worked for me.
[RNSplashScreen show]; return [super application:application didFinishLaunchingWithOptions:launchOptions];to
BOOL ret = [super application:application didFinishLaunchingWithOptions:launchOptions]; if (ret == YES) { [RNSplashScreen show]; } return ret;I encountered this issue with: “react-native”: “0.72.4” “react-native-splash-screen”: “^3.3.0”
@ShaharyarMaroof Do this simple test… remove [RNSplashScreen show]; from your appdelegate file, rebuild your app and see what happens. I rediscovered this issue after upgrading to RN 61 and thought it was the splash screen not hiding, but I had other errors preventing the splash screen from hiding. Once i removed the [RNSplashScreen show]; and could identify and resolve my console errors, I added [RNSplashScreen show]; back and it works fine.
Dont use this package simply make a splash screen in xcode it will be added no need of this package, this hide method does not work.
I’ve tried @wincod75 and @stephencookdev 's solution. But none of them are working. I’m using react-native 0.60.6 and react-native-splash-screen 3.2.0. For android it is working perfectly.
In my AppDelegate file I have the required lines in the following order.
[self.window makeKeyAndVisible];[RNSplashScreen show];The async calls execute fine, but the splash screen doesn’t hide. Any help will be appreciated.
So, I had the same exact issue, this is how I fixed it. Seems a bit glitchy in my emulator, will test on actual device.
change -> DidMount to -> WillMount
componentWillMount() { SplashScreen.hide(); }
“react”: “^16.3.2”, “react-native”: “^0.55.4”
UPDATE
While this will work, if you have an authenticated space (login/logout) with tokens, which allows the app to not always fire from the initial launch screen, the splash screen still remains and does not hide. Currently exploring additional options.
UPDATE PART 2
Ok, so if your app has the potential to launch from different screens (login screen/another screen) you’ll need to import RN Splash Screen and hide on both screens. Component Did Mount does not work for me on my launch screen; it does work on my other “interior” screen. Component Will Mount works everywhere.
I remove [SplashScreen show] in my native code , then found some error in my js code; that is the real reason for it; sorry , my english is very poor; holp it can help
+1 Using “react-native”:“0.47.2” and “react-native-splash-screen”:“^3.0.6”! The screen does not disappear after calling SplashScreen.hide() in componentDidMount() function in my LoginScreen. Here is my AppDelegate.m
Here is my LoginScreen.js (as part of StackNavigator of react-navigation):
Any help?
I really have been removed after
but also the same problem, splash screen is not hiding, I’m using iOS 10.3 and react-native-splash-screen 3.0.1 react-native 0.44.3
now anyone could solve this issue, give me some help? waiting answer on line.