zahabba
zahabba

Reputation: 3231

React Native (iOS) app loads nicely on wifi; crashes on LTE/cell

I've written a simple app for my iPhone that calls an API a dozen times (I'm using async/await for each) for public transportation stop predictions, and then assembles it into a page.

The app loads and displays without quickly on Wifi. However, on a robust LTE connection, it displays strange behavior:

It does not appear to be related to the fact that LTE is a bit slower than my Wifi. The API payloads are small, and the LTE is pretty robust (tried in a few different locations; it was fast).

The entire index.ios.js is available here: https://github.com/jasonmenayan/Muni/blob/master/index.ios.js

Upvotes: 4

Views: 2375

Answers (1)

Freya Yu
Freya Yu

Reputation: 266

This issue is caused by build the app in Debug phase. The only thing you need to do, is going to xCode Product → Scheme → Edit Scheme, and change the Build Configuration in Run tab from "Debug" to "Release".

Please check the official doc and the issue here:

https://facebook.github.io/react-native/docs/running-on-device.html

https://github.com/facebook/react-native/issues/12022

Upvotes: 4

Related Questions