-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS] Add 1 more solution #234
Conversation
Using native splash screen
# Conflicts: # ios/RNSplashScreen.h
This should be the actual iOS implementation. The current implementation of looping on the main thread until |
Hey, any usage example? |
@radko93 just modify 1 line in
where |
Is anyone checking this PR? Looks like we need it, too. For sure the way to achieve the splash-screen looks much better than an infinite loop. Thanks! |
Any idea if there's plans to support |
@binhnd-socicom componentDidMount() {
this.timer2 = setTimeout(() => {
console.log('SplashScreen show')
console.log(SplashScreen)
SplashScreen.show();
}, 4000);
this.timer3 = setTimeout(() => {
console.log('SplashScreen hide')
SplashScreen.hide();
}, 6000);
}
componentWillUnmount() {
clearTimeout(this.timer2);
clearTimeout(this.timer3);
} console: >>>>
|
@zzzeee I think your error doesn't related to my modification as I don't touch to original |
I second (third? fourth?) this change. From what we can gather the current implementation blocks FCM notifications, and this one works like a charm. |
Bumping this. Can we get this one in? |
@binhndicts Thanks for the PR mate, really appreciated! Just wondering, is there any solutions for Launch Image? |
@mk-nickyang In my opinion, using launch image is not a good solution as many different resolution devices were released recently. Don't you think using xib or storyboard is more simple and flexible? |
Current solution is making
didFinishLaunchingWithOptions
run longer. Sometime I got crash (only when developing) because of[[NSRunLoop mainRunLoop] runUntilDate:later];
.1 more solution: Add native Splashscreen view to react native rootView and remove when
hide()
. Users will see Splashscreen while loading and starting JS code like current solution, but it doesn't effect app's lifecycle.