React-native-splash-screen: SplashScreen show Is not a function

Created on 18 Oct 2017  ·  11Comments  ·  Source: crazycodeboy/react-native-splash-screen

I am having this issue. I did all in documentation and I am asking you for help how to solve this. I must say that this works perfect in Android but not in iOS.

simulator screen shot - iphone 6 - 2017-10-18 at 17 36 08

screen shot 2017-10-18 at 5 47 19 pm

screen shot 2017-10-18 at 5 47 45 pm

Dependencies:

React 16.0.0-alpha.6
React Native 0.44.3
npm 5.3.0
node 7.9.0

All 11 comments

暴露给js的只有hide

@JulioOrellana I think SplashScreen.show() is not a method accessible from JS. It is intended to call only from the native( Java or Swift). Before open an issue, please read the readme carefully, it clearly says

Method | Type | Optional | Description
-- | -- | -- | --
show() | function | false | Open splash screen (Native Method )
hide() | function | false | Close splash screen

I think this as a good feature to be implemented on this library. Feel free to open a PR if you are interested to support.

@Ansalibrahim SplashScreen.show() is accessible from JS in android but not iOS. Does anyone know if this is fixable?

@NathHorrigan probably, we need to expose that native method in ios to react-native. I am not sure about this, but if it is possible it will take less than 4 hours to implement this. @crazycodeboy please confirm if it is possible, I am ready to open a PR if needed.

@Ansalibrahim I think that was a misinterpretation rather than not reading the README carefully

@betoharres I am not sure. Even if it is a misleading interpretation, the function isn't available in js side. And it is a fact. I tested it in react native version 0.50.4 on ios.

It would be great to make show method available from js side in iOS, thanks for your work anyway!

I am having the same issue. It would be nice to have the ability to call the show method from iOS as well. In the meantime is there any possible workarounds that someone has come up with that I can use to show the splashscreen whenever needed?

badly need this feature also

some updates on this one? This would be great feature

badly need this feature also

Was this page helpful?
0 / 5 - 0 ratings