18

getting this error

** BUILD FAILED **

The following build commands failed: CompileC /Users/karthikn/AwesomeProject/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/React.build/Objects-normal/x86_64/RCTTabBarItem.o Views/RCTTabBarItem.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (1 failure)

Installing build/Build/Products/Debug-iphonesimulator/AwesomeProject.app An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2): Failed to install the requested application An application bundle was not found at the provided path. Provide a valid path to the desired application bundle. Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/AwesomeProject.app/Info.plist Print: Entry, ":CFBundleIdentifier", Does Not Exist

furball514
  • 273
  • 2
  • 4
  • 15

11 Answers11

7

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

thai huynh
  • 116
  • 1
  • 4
4

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 install
cd ios
pod 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 watchman
sudo 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

Ali Shirazee
  • 1,008
  • 10
  • 11
3

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

Floris M
  • 1,764
  • 19
  • 18
3
  1. If your xcode is open, close it
  2. Remove DrivedData
  3. Update your pod files using pod update command
  4. Run npx react-native ios command

its worked for me i hope work for you too

  • Worked for me. My original error was with Flipper-Folly, broke in DistributedMutex.cpp after an XCode update. `pod update` updated Flipper-Folly and resolved the build error. – spencer741 Apr 29 '21 at 02:27
1

There's a good chance you're running an outdated version of React-Native and your template is no longer compatible.

There are instructions provided on ways to upgrade.

The simplest would be to run react-native upgrade and you'll be prompted with files react-native wants to overwrite. Clicking yes through all the prompts solved this issue for me but if you're concerned about losing any changes, it's recommended to install npm install -g react-native-git-upgrade and merge any conflicts after running react-native-git-upgrade

1

Try sudo react-native run-ios This helped me

Mukesh Kumar
  • 944
  • 2
  • 10
  • 26
  • Oddly enough running this results in the app not launching at all – arshbot Jan 03 '18 at 05:33
  • when u do sudo react-native run-ios this command wil start your packager but not the simulator, so if you do react-native run-ios in the same terminal after the previous command finishes it will launch the simulator You should have the jsBundle file in your project otherwise it will throw error again – Mukesh Kumar Jan 04 '18 at 10:44
0

Check this In Your info.plist Bundle identifier

Or Add this Bundle identifier name as --> com.cmpname.yourapp // change name according

enter image description here

Lalit kumar
  • 1,797
  • 1
  • 8
  • 14
  • where's this Your info? I'm new to xcode and react native. – furball514 Apr 13 '17 at 14:18
  • In xcode project left menu search info.plist or you can follow this http://stackoverflow.com/questions/4159090/how-to-tell-xcode-where-my-info-plist-and-pch-files-are – Lalit kumar Apr 14 '17 at 04:56
0

DO NOT use space in project path. It had solved my problem.

Nimish Patel
  • 585
  • 4
  • 17
0

Replace Boost C++ Libraries with this one Download Link

/node_modules/react-native/third-party/boost_1_63_0

Meghs Dhameliya
  • 2,406
  • 24
  • 29
-2

seems like there is an issue with the react-native version, downgrading the version will resolve the issue. Use the following commands:

  • rm -rf node_modules/react
  • npm i react@16.0.0-alpha.6 -S
  • npm i react-native@0.44.0-alpha.6 -S
  • react-native run-ios
-3

There are different problems that cause this issue. I'll post here what I did to resolve in my case.

1 - Delete the folder node_modules and the folders of android and ios from project root:

rm -rf node_modules/ ios/ android/

2 - Rebuild the folders:

npm install && react-native upgrade

or (If you have used yarn in the project)

yarn install && react-native upgrade 

3 - After that, just run the command again:

react-native run-ios 

or

react-native run-android.

I hope it helped =)