Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App iOS stuck on blank white screen when build release React Native

I'm setting up a new project using React Native like this tutorial: https://facebook.github.io/react-native/docs/getting-started.html and build iOS release but it does not work, the blank white screen showed after LaunchScreen run.

The app works if build in Debug(react-native run-ios) but does not work in Release(build release by Xcode or terminal).

react-native v0.53.0

react-native-cli v2.0.1

node v8.10.0

Xcode 9.2

blank white screen

The log show in Xcode:

2018-02-06 15:55:14.464233+0700 MyApp[306:35863] [Accessibility] ****************** Loading GAX Client Bundle **************** 2561-02-06 15:55:14.697 [error][tid:main][RCTCxxBridge.mm:423] Failed to load bundle(file:///var/containers/Bundle/Application/4FAF82CD-9EA4-4E73-800A-A2ABC9313405/MyApp.app/main.jsbundle) with error:(Error reading bundle /var/containers/Bundle/Application/4FAF82CD-9EA4-4E73-800A-A2ABC9313405/MyApp.app/main.jsbundle (null)) 2018-02-06 15:55:14.706782+0700 Shiip[306:35863] Failed to load bundle(file:///var/containers/Bundle/Application/4FAF82CD-9EA4-4E73-800A-A2ABC9313405/MyApp.app/main.jsbundle) with error:(Error reading bundle /var/containers/Bundle/Application/4FAF82CD-9EA4-4E73-800A-A2ABC9313405/MyApp.app/main.jsbundle (null))

like image 737
3 revs Avatar asked Feb 06 '18 09:02

3 revs


1 Answers

I use many node version so the Xcode not using the node version which I used in my Terminal, it's make my app build crashed. Let's do this to solved my problem

Open The Script Build Phases in Xcode: enter image description here

Now, using with the node version path exactly (use command: which node to get your node version path)

enter image description here

And my problem was solved

like image 109
3 revs Avatar answered Sep 22 '22 15:09

3 revs