TL;DR —
If you’re trying to get react-native working with XCode 10 and encountering a bunch of mysterious errors, here’s what you do. This is for just getting a brand new React-native app working using react-Native init. You might have to do lots of other fun things if you have an existing project. For folks with an existing app who upgraded to XC 10, you probably have other issues and this might serve as a good starting point.Fixing babel runtime just install @babel/runtime.
How do you get react-native init to work for now
Note: This is for just getting a brand new react-native app working using react-native init. I haven’t tried it with CRNA. You might have to do lots of other fun things if you have an existing project.
So, if you’re trying to get react-native working with XCode 10 and encountering a bunch of mysterious errors, here’s what you do.
Change the build setting to legacy
First, open your project in XCode by double-clicking on ios/<YourApp.xcodeproj>.Then go to File > Project Settings …Change the Build System to Legacy Build System in Per-User Project Settings.
Fix babel runtime
Just install @babel/runtime as a dev dependency (https://github.com/facebook/react-native/issues/21310).
npm install @babel/runtime --save-dev# ORyarn add @babel/runtime --devFor folks with an existing app who upgraded to XCode 10, you probably have other issues and this might serve as a good starting point.
[story continues]
Written by
@sanjaypojo
Technical Writer on HackerNoon.
Topics and
tags
tags
react-native|ios|xcode
This story on HackerNoon has a decentralized backup on Sia.
Transaction ID: xQtJWSglBsImGj_JapD1C8FTd5nZWDvK46bhm-Isqn0
