Expo Go works fine on iPhone8 simulator but hangs on splash screen on iPhone 11 simulator and my real iPhone

I simply cannot figure out what’s going on here—My app works great in the simulator when it is set to iPhone 8, but if I change to 11, or try to open it in the expo app on my real iPhone, it hangs at the splash screen.

I am loading a few images and fonts with the splash screen, but it works perfectly well in the simulator when it’s set to iPhone 8, and I have no idea why it doesn’t just work equally well on any device size.

I started off developing on the iPhone 8 simulator because it was the default device in the simulator and I’d rather develop for smaller screens first anyway. It’s been working fine for weeks, I’ve just discovered this behavior now when trying to run it on other sizes of devices and with expo go on my real device.

Does anyone have any ideas why the behavior would be different?

Edit: update on my findings. I have narrowed the issue down to a check for isClientReady which is a Boolean I create during the Splash Screen loading to check for an existing session and if so, connect to the Stream chat service’s client. When I remove this, then the Splash screen continues to load for the other device sizes, but then it sets up a race condition where the app loads before the user is connected to Stream and I get an error. I may be able to circumvent this by throwing up a spinner wheel once past the loading screen to await the Stream client check, but I wanted to avoid multiple loading states when the app starts and hide it behind the splash screen.

Weirdly, this is not and has never been a problem when using the iPhone 8 simulator, it works perfectly. It seems to be a problem with all other phone sizes, though, and my real iPhone 11.

So the question still remains—does anyone know why the behavior would vary between two different types of simulator? I’m stumped.

Sometimes a hang on the splash screen can indicate an error very early in the JavaScript code. This doesn’t usually cause such an error, but the main difference between iPhone 8 and newer iPhones is that the newer ones usually have a notch in the screen, and there can be different logic invoked due to that.

A great first step here is to try with a new project via npx create-expo-app. If a new app created that way works on the other devices, that would indicate an issue with your app code.

Thanks for your reply, here is an update on my findings. I have narrowed the issue down to a check for isClientReady which is a Boolean I create during the Splash Screen loading to check for an existing session and if so, connect to the Stream chat service’s client. When I remove this, then the Splash screen continues to load for the other device sizes, but then it sets up a race condition where the app loads before the user is connected to Stream and I get an error. I may be able to circumvent this by throwing up a spinner wheel once past the loading screen to await the Stream client check, but I wanted to avoid multiple loading states when the app starts and hide it behind the splash screen.

Weirdly, this is not and has never been a problem when using the iPhone 8 simulator, it works perfectly. It seems to be a problem with all other phone sizes, though, and my real iPhone 11.

So the question still remains—does anyone know why the behavior would vary between two different types of simulator? I’m stumped.

I don’t see how the notch would affect connecting to a this Stream Chat client.

I thought maybe it’s something like remote API calls are forbidden while the Splash Screen is shown, but since it works on the iPhone 8 sim, this can’t be an issue,