Skip to content
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

Could not show splash screen again on iOS. #268

Closed
PMExtra opened this issue Jul 16, 2018 · 6 comments
Closed

Could not show splash screen again on iOS. #268

PMExtra opened this issue Jul 16, 2018 · 6 comments

Comments

@PMExtra
Copy link

PMExtra commented Jul 16, 2018

My application have a function that need to "reload js".
So I want to use "react-native-restart" with "react-native-splash-screen".
They work fine on Android.
But I found that it would not show splash screen when I call SplashScreen.show() from js on iOS.
I have looked the native code for iOS, it's just a waiter in show(), it's very different from Android.

It that any solution for my requirement?
Whatever, I think it should be explained in README, it cost me a lot of time.

@PMExtra
Copy link
Author

PMExtra commented Jul 16, 2018

哇,才发现这个项目是国人写的👍。早知道直接说中文了。
感觉应该是有办法在运行时拿到LaunchImage或者LaunchScreen的。
参考:
https://stackoverflow.com/questions/25966865/programmatically-accessing-the-launch-screen-xib-or-storyboard
http://adad184.com/2015/10/15/tips-access-current-launch-image

@binhndicts
Copy link
Contributor

binhndicts commented Jul 17, 2018

I think you can refer my PR to get solution you need. I'm using launch-screen similar to what you mentioned above.
#234

@PMExtra
Copy link
Author

PMExtra commented Jul 18, 2018

@binhnd-socicom Great! That's what I want. But I think it would be better if it keep the design consistent with android (remove the looping wait, use your solution as default. And just overload the show method instead making more methods with different name).
In the end, the most important thing is that, I need to use LaunchImage instead xib/storyboard.

@hpmax00
Copy link

hpmax00 commented Aug 10, 2018

@PMExtra
You can try this , but it may be slow in android. Or I can fix the android problem later.
react-native-splashscreen

@PMExtra
Copy link
Author

PMExtra commented Aug 10, 2018

@hpmax00 I'm not sure what your mean. I have used it on Android, it works fine.

@kodie
Copy link

kodie commented Nov 13, 2018

Being able to call SplashScreen.show() should really be implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants