mehcode / rn-splash-screen

A JavaScript-controlled splash-screen for React Native designed to be run directly after the native splash-screen.
MIT License
350 stars 95 forks source link

[iOS] App starts with black screen, briefly shows splash, then hides it #17

Closed AlexDM0 closed 7 years ago

AlexDM0 commented 7 years ago

As the title says, the app starts with a black screen, it quickly shows splash (after about 0.5 seconds) then hides it again.

I'm on ios, xcode 7, rn 32.1, followed the config instructions.

Any ideas?

mehcode commented 7 years ago

Have you tried running the example?

All I can say is try comparing configuration. I can't help much without access to the code as afaik the example works.

AlexDM0 commented 7 years ago

Good point, I had a working setup with the old version so I figured it'd be plug and play. I'll try the example.

Thanks!

mehcode commented 7 years ago

Ah. If you mean the one that was under remobile -- the iOS setup changed a bit. It now uses the native launch image as the splash vs a random png file. So if you didn't configure the launch image that might be why.

AlexDM0 commented 7 years ago

I did follow the setup guide, is it complete? I'll try the example tomorrow regardless.

On 27 Sep 2016, at 19:12, Ryan Leckey notifications@github.com wrote:

Ah. If you mean the one that was under remobile -- the iOS setup changed a bit. It now uses the native launch image as the splash vs a random png file. So if you didn't configure the launch image that might be why.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

mehcode commented 7 years ago

Hm.. I think it's complete. I admit I only wrote it as I made the example and didn't go back through and make sure it was reproducible. Let me know if you find a missing step when you look at the example.

AlexDM0 commented 7 years ago

Turns out the problem was that the sizes of the images supplied were not exactly right (and maybe that the "Launch Screen File" field is empty in your example.

I fixed these issues and it seems to be working now. Thanks!

mehcode commented 7 years ago

[...] sizes of the images supplied were not exactly right [...]

Now that you say that.. I have had this happen before. Native iOS is very particular and wants exact sizes. I had the wrong sizes for a long time in a cordova app and when it was converted to RN I got the black screen as well.

AlexDM0 commented 7 years ago

Maybe add it as a note to the readme :) for bonus points add the resolutions :) Thanks again!

On 28 Sep 2016, at 21:00, Ryan Leckey notifications@github.com wrote:

[...] sizes of the images supplied were not exactly right [...]

Now that you say that.. I have had this happen before. Native iOS is very particular and wants exact sizes. I had the wrong sizes for a long time in a cordova app and when it was converted to RN I got the black screen as well.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.