React Native ios build failed on react-native run-ios React Native ios build failed on react-native run-ios ios ios

React Native ios build failed on react-native run-ios


Xcode 8.2 still occur same error. Three lines bellow fixed it for me :)Downgrade react(16.0.0-alpha.12 -> 16.0.0-alpha.6) & react-native(0.45.0 -> 0.44.0)
rm -rf node_modules/react
npm i react@16.0.0-alpha.6 -S
npm i react-native@0.44.0 -S
Then run react-native run-ios


If it's your first project, you may have the same problem than me:do NOT use space in your project path! 🎉 😄


Your build could be failing because of the current node js version installed, or due to your pod files or a number of other reasons.

This error may also be when cloning a react native repository from github.

This solution may work as I was able to recreate this issue(refer to the screen shots):

Solution one:

firstly:

If you have the latest version of node js installed you may have some compatibility issues with some of the dependencies, install the recommended version of Nodejs instead.

enter image description here

after installation, reinstall your dependencies and update your pod files:

npm installcd iospod install 

or

pod update

solution two:

this can happen if you haven't installed react native previously on your system and are trying to run a clone react native repository from github.

brew install watchmansudo gem install cocoapods

then in the rn project clone

 cd ios  pod install

Problem:

This is what the error message looks like:

legacy compatibility issues:

enter image description here

Build failed

enter image description here

Solution:

After following the above steps this issue was resolved instantly:

enter image description here