React-native: Latest react-native app doesn't work ":CFBundleIdentifier", Does Not Exist

Created on 30 Apr 2016  ·  294Comments  ·  Source: facebook/react-native

On OS X El Capitan v10.11.4

node --version v6.0.0
npm --v 3.8.8
react-native-cli: 0.2.0
react-native: 0.24.1
watchman --v 4.4.0
xcode 7.3

$ react-native init AwesomeProject
$ cd AwesomeProject
$ react-native run-ios

** BUILD FAILED **


The following build commands failed:
    PhaseScriptExecution Run\ Script /development/misc/react/AwesomeProject/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/React.build/Script-006B79A01A781F38006873D1.sh
(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
/development/misc/react/AwesomeProject/node_modules/promise/lib/done.js:10
      throw err;
      ^

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

    at checkExecSyncError (child_process.js:470:13)
    at Object.execFileSync (child_process.js:490:13)
    at _runIOS (runIOS.js:91:34)
    at runIOS.js:24:5
    at tryCallTwo (/development/misc/react/AwesomeProject/node_modules/promise/lib/core.js:45:5)
    at doResolve (/development/misc/react/AwesomeProject/node_modules/promise/lib/core.js:200:13)
    at new Promise (/development/misc/react/AwesomeProject/node_modules/promise/lib/core.js:66:3)
    at Array.runIOS (runIOS.js:23:10)
    at Object.run (/development/misc/react/AwesomeProject/node_modules/react-native/local-cli/cli.js:86:13)
    at Object.<anonymous> (/usr/local/lib/node_modules/react-native-cli/index.js:88:7)
Locked

Most helpful comment

Not yet... I finally bought a new mac and solved.

All 294 comments

I saw you posted on StackOverflow as well - any luck so far? I am playing around with master at the moment and I can't reproduce. Maybe it's one of the problems described there, e.g. the sudo or permissions? Also do you have CFBundleIdentifier in your Info.plist ?

I tried deleting all my node modules, clear cache etc and sudo as well with no luck. I do have CFBundleIdentifier in the Info.plist as:

<key>CFBundleIdentifier</key>
<string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>

@grabbou Are you trying it with Node 6? I haven't been able to reproduce it, but I've only tried so far with Node 4 & 5, haven't installed 6 yet. Perhaps it's an issue there?

@dsibiski I had node 5.9 before and I had the same issue, I uninstalled node/npm and deleted every node module and reinstalled (that's when I got node 6 on my machine) but I still am stuck with the above exception.

I also encountered a similar error.

On OS X El Capitan v10.11.4

node --version v6.0.0
npm --v 3.8.6
react-native-cli: 0.2.0
react-native: 0.24.1
watchman --v 4.4.0
xcode 7.3

$ react-native init AwesomeProject
$ cd AwesomeProject
$ react-native run-ios

* BUILD SUCCEEDED *

The following commands produced analyzer issues:
Analyze Modules/RCTUIManager.m
(1 command with analyzer issues)
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
/Users/shinout/workspace/AwesomeProject/node_modules/promise/lib/done.js:10
throw err;
^

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

    at checkExecSyncError (child_process.js:470:13)
    at Object.execFileSync (child_process.js:490:13)
    at _runIOS (runIOS.js:91:34)
    at runIOS.js:24:5
    at tryCallTwo (/Users/shinout/workspace/AwesomeProject/node_modules/promise/lib/core.js:45:5)
    at doResolve (/Users/shinout/workspace/AwesomeProject/node_modules/promise/lib/core.js:200:13)
    at new Promise (/Users/shinout/workspace/AwesomeProject/node_modules/promise/lib/core.js:66:3)
    at Array.runIOS (runIOS.js:23:10)
    at Object.run (/Users/shinout/workspace/AwesomeProject/node_modules/react-native/local-cli/cli.js:86:13)
    at Object.<anonymous> (/usr/local/lib/node_modules/react-native-cli/index.js:88:7)

In my case, BUILD seems to succeed. However, the process terminates with the error message above.

I got the same problem on one of my projects... You could kind work around with only XCode builds. I think it appeared after changing the name of the project.

I was able to solve this issue! Looks like port 8081 was in use :

lsof -n -i4TCP:8081
node    7601 CXI624   23u  IPv6 0xc6b249599e5f1169      0t0  TCP *:sunproxyadmin (LISTEN)

So I followed the instructions from React Native Troubleshooting https://facebook.github.io/react-native/docs/troubleshooting.html

kill - 9 7601

and ran the command react-native run-ios again and everything worked as expected (on node 6 as well).

Closing this issue & thanks for your help!

@arun0009 Awesome, thanks for posting the answer back here 👍

@shinout Hello, I have the same problem, you solve?

Not yet... I finally bought a new mac and solved.

I solved this issue with the react-native upgrade command, which helped me reset some details in various xcode files. At least that is what I think solved the issue.

This isn't working for me. I'm still getting the same error. Node 5.11

Still getting the error too. Killing process on port 8081 did not work.
react-native-cli: 0.2.0
react-native: 0.26.2
node: 5.3.0
npm: 3.3.12

Tested with a new project setup by running
$ react-native init newProj && cd newProj
$ react-native run-ios

Typing the following doesn't give the issue but a "No devices are booted"..

sudo react-native run-ios

Had another react packager running on 8081. Killing that process made it to work.

Running it with sudo does not solve it for me.

The suggest solution by @consideRatio fixed this problem for me.

react-native upgrade

Worked after upgrading XCode to 7.3.1

Nothing posted here works for me unfortunately :(

In my case my ProductName got corrupted.

I had to change my project name, scheme name for my project and Product Name so they are all the same, and after that I started seeing the errors mentioned above.
When I went to Info.plist to check what it says for my CFBundleIdentifier (or just "Bundle identifier" if you are viewing Info.plist in Xcode) I saw:
com.{company}.mobile.$(PRODUCT_NAME:rfc1034identifier)
So It's a path.
So I decided to investigate in Xcode - I clicked on the project name in left pane and went to BuildSettings. Under Packaging my ProductName instead of being, say "MyAwesomeApp" was something like "MyAwesomeAppApp" - last part was repeated twice. Needless to say I had to change it to match my ProjectName (MyAwesomeApp), saved in Xcode and

$ react-native run-ios

worked w/out any problems.
Now it makes sense why it was showing errors:
"An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle."
The "path" was wrong!
Hope it helps someone.

If you have some other applications are always occupying port 8081 no matter how many times you have killed the process, try changing the port:

http://stackoverflow.com/questions/30216417/react-native-port-8081-already-in-use-packager-is-either-not-running-or-not-r

It solves my problem.
Hope it helps someone.

I still get the same Entry, ":CFBundleIdentifier", Does Not Exist error that this ticket mentions. I've tried:

  • killing processes on port 8081
  • changing the port
  • running it with sudo
  • updating react-native (I'm on the latest version)

Any other ideas?

Interestingly enough, everything works if I open the .xcworkspace in XCode and run it from there.

What ended up working for me was that I needed to open up in XCode and change the scheme from building for a Release to Debug. Don't know if that will work for anyone else but it is definitely something to check out. After changing it once, you can then run it react-native run-ios via the command line

@joshschumacher upgrade worked.

When nothing fixes, try on Xcode

  1. Go to File -> Project settings
  2. Click the Advanced button
  3. Select "Custom" and select "Relative to Workspace" in the pull down
  4. click done, done

@stief510 That worked for me! Thanks!

As @gvlamadrid said

When nothing fixes, try on Xcode

  1. Go to File -> Project settings
  2. Click the Advanced button
  3. Select "Custom" and select "Relative to Workspace" in the pull down
  4. click done, done

5 pic

nothing work for me...

Did not fix it for me (I killed ports, changed project settings, etc etc.)

Nothing worked for me too. Using node v6.2.2

I tried all solutions, but nothing works. Great job, react native...

@trevorwang thank you so much it worked for me

My problem was also that I had something running on port 8081 (discovered by running sudo lsof -n -i4TCP:8081)

Fixed by using an older version of react-native by running react-native init --version 0.27 instead of react-native init to create the project.

Then, I changed the appdelegate.m file and the React.xcodeproj and the RCTWebSocketExecutor.m as detailed in the first step here.

Then, in the project folder, instead of react-native ios-run, I did npm start -- --port 5000, and then ran the project in Xcode with ⌘+R

Mmmm, this issue is one of the top Google results for react-native apps not running in the simulator ("no devices are booted"). Since this seems to still be a lingering issue for people I'm dumping some info here - YMMV.

This used to happen to me when I did iOS work for a living; oftentimes the simulator is just wonky as hell. ps aux | grep Simulator will usually give me something to kill that should've died already. These steps usually work for me:

  1. Kill simulator/debug server.
  2. ps aux | grep Simulator or whatever your preferred shell magic is, see if anything is lingering around that didn't shut down correctly. If there's something, kill it.
  3. Re-run simulator/debug server/build process (react-native run-ios). If it still gives you a "no devices booted" error (and your simulator is a black screen), just reboot the simulator completely via Hardware -> Reboot, then open your app.

Unless you actually have something running on port 8081, you shouldn't need to change it - for some reason I see that as the most answered solution to this stuff around the web. These steps work for me pretty much every time.

Also, keep in mind if you change your NSAppTransportSecurity settings in your Info.plist, it can mess with this stuff.

@joshschumacher works for me too

Can confirm that react-native upgrade worked for me & that stopping processes running on port 8081 didn't as the process running on 8081 is being started by react-native run-ios

Need to fix code manually.
SecRandomCopyBytes -> (void)SecRandomCopyBytes in RCTSRWebSocket.m
then tryreact-native run-ios again, it worked for me.

@stief510 solution is exactly what got it done for me. Let me tell you how to do it. Click the Product menu in xcode, in the Scheme flyout menu, look at the bottom - you'll see Edit Click that. A modal menu appears. The Build configuration has a select box, make sure its set to Debug. Fixed it for me.

thanks @stief510 that worked after trying everything else

I just do npm install react-native-cli@latest -g, then react-native run-ios is work!

npm install react@latest react-native@latest,it works for me after upgrade xcode 7.x to 8.0.

react-native upgrade Works for me, thanks.

Nothing works for me, upgraded ios to macsierra, xcode to 8.0, change the project build location, closed ports, upgrade react-native installed the latest cli. Nothing seems to work for the default react native tutorial.

The following build commands failed:
Analyze RCTVibration.m
(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

Any ideas?

Please re-open this, I still experience this, and this happen to both F8 app and Hacker news example app. We are really eager to use React Native for our project, but this bug kind of block us and we are afraid of such kind of problem will happen along the way.

My setup :
macos sierra 10.12
xcode: Version 8.0 (8A218a)
npm: 3.10.3
"react-native": "^0.20.0",
"react-native-gifted-listview": "0.0.12",
"react-native-scrollable-tab-view": "^0.3.8",
"react-native-vector-icons": "^1.2.1",
"react-native-activity-view": "^0.2.5"

The following commands produced analyzer issues:
Analyze RCTImageLoader.m
(1 command with analyzer issues)

The following build commands failed:
CompileC /Users/xx/Downloads/HackerNews-React-Native-master/ios/build/Build/Intermediates/RCTWebSocket.build/Debug-iphonesimulator/RCTWebSocket.build/Objects-normal/x86_64/RCTSRWebSocket.o RCTSRWebSocket.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/HN Reader.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
/Users/xx/Downloads/HackerNews-React-Native-master/node_modules/promise/lib/done.js:10
throw err;
^

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

at checkExecSyncError (child_process.js:475:13)
at Object.execFileSync (child_process.js:495:13)
at _runIOS (runIOS.js:77:34)
at runIOS.js:24:5
at tryCallTwo (/Users/xx/Downloads/HackerNews-React-Native-master/node_modules/promise/lib/core.js:45:5)
at doResolve (/Users/xx/Downloads/HackerNews-React-Native-master/node_modules/promise/lib/core.js:200:13)
at new Promise (/Users/xx/Downloads/HackerNews-React-Native-master/node_modules/promise/lib/core.js:66:3)
at Array.runIOS (runIOS.js:23:10)
at Object.run (/Users/xx/Downloads/HackerNews-React-Native-master/node_modules/react-native/local-cli/cli.js:86:13)
at Object.<anonymous> (/usr/local/lib/node_modules/react-native-cli/index.js:88:7)

@alanlavintman I finally got to the same error message as you. At that point the issue was that AwesomeProject.app was in the wrong place. For me, it was NativeStarterKit.App. It was located under:
ios/build/Products/Debug-iphonesimulator/NativeStarterKit.app
So I copied it to:
ios/build/Build/Products/Debug-iphonesimulator/NativeStarterKit.app

@gavinxyang The issue above or the 5th bullet point below could be your issue. Make sure the path reported in your "Command Failed" error actually exists for "HN Reader App" it may be in the build/Products folder instead.

There were other items I did before just to get to this point:

  • I added the Product Name Identifier to the main project as mentioned above (this helped with 1 error)
  • I removed extra Custom Compiler Flags (this wasn't it)
  • I set the project build path to be relative per @gvlamadrid (this helped with 1 error)
  • I upgraded the default OS NodeJS version which was still 0.10.x because even though I'm using NVM, the terminal window that pops up with Packager would inherit the base OS version of NodeJS and fail.
  • And the other error I had that was stumping me:
    ios/build/Products/debug-iphonesimulator/NativeStarterKitTests.xctest.DSYM Where is the .DSYM coming from? It keeps recompiling with that extension. Removing the .DSYM from the extension cured the big stumper for me.
  • Port 8081 was not a problem.

Now I'm getting JS errors in the App but at least everything builds. If you follow the errors listed with "Command Failed" they are the ones actually causing the break.

I hope this helps some people who are still stuck after all the previous fixes. This may also be tied to XCode 8.0 changing things around and react-native still not compliant.

Full Details:
react-native-cli: 1.0.0
react-native: 0.31.0
node: 6.6.0
npm: 3.10.3
XCode: 8.0
Mac OSX: El Capitan 10.11.6

After 3-4 hours of debugging I finally have it working. Now I will go back and try again with Pepperoni that was originally throwing similar errors when I decided to switch to NativeStarterKit.

Thanks, dmitrye@!

Here is how I fix it:
1) remove custom flags, so RCTScrollView.o can be compiled one more step further. (still fail)
2) Replace _refreshControl with refreshControl, and comment one line. https://github.com/facebook/react-native/issues/8472

  • (void)setRefreshControl:(UIRefreshControl *)refreshControl
    {
    if (refreshControl) {
    //[UIRefreshControl removeFromSuperview];
    }
    refreshControl = refreshControl;
    [self addSubview:refreshControl];
    }

However, I still insist re-open this bug, because these thing should not happen and really frustration. Also my fix is change react-native module itself. Hope react-native can fix this for xcode 8.0, which looks like a very common problem.

Finally got this working after reading @dmitrye 's comment. These steps just have a slight twist to @gvlamadrid 's instructions

How I fixed it.

  1. rm -rf ios/build
  2. Go to File -> Project settings
  3. Click the Advanced button
  4. Select "Custom" and select "Relative to Workspace" in the pull down
  5. When I selected this option it defaulted my paths to Build/Products and Build/Intermediates. I had to manually change these to build/Build/Products and build/Build/Intermediates

Seems the run-ios command was looking for the app in ios/build/Build/Products when it was actually being placed in ios/Build/Products. Just a hunch but maybe this has something to do with the way that mac ignores case when dealing with paths on the command line? Could be leading to the run-ios command getting tripped up. Or maybe the default path is just wrong.

I'm on XCode v8.0

Worked after upgrading dependencies "react-native": "0.34.0"

Fixed in my pull request. Upvote it please.

Downgrading Xcode 8 -> Xcode 7.3.1 fixed the issue for me

This solution worked for me - https://medium.com/@alberto.schiabel/react-native-on-xcode-beta-8-0-how-to-fix-initial-build-error-f0225c649850#.t0m08cocz

@CEOGavin link worked for me BUT I gotta run from XCode. react-native run-ios still gives me the error.

Running react native v0.31. Can't upgrade yet.

@ghost I have the same problem, have you solve?

@stief510 It worked for me. Thanks!

@CEOGavin thanks for sharing my article!

Upgrading react-native => 0.35.0 worked for me.

Upgrading react-native => 0.35.0 worked for me.

Just doubleclick on the RCTWebSocket project in your navigator and remove the flags like those under build settings > custom compiler flags

link:https://github.com/facebook/react-native/issues/10545

i got this problem tool. Node 6.8 and React Native 0.36.
react-natvie upgrade worked for me.

The error raises when I use rnpm link to link packages including native codes,
But there is no error when I use react native link

@simlegate rnpm has been deprecated and merged in to react-native. Guessing the link functionality that currently exists in the old rnpm binary is not compatible with the xcode 8.0 build structure

This error occurred to me when I changed the CFBundleDisplayName to another value than CFBundleName. Keeping this two values in sync solved the problem for me.

I worked run "react-native upgrade" thanks

I managed to get it working by changing the folder permissions on my project to 777.

doing npm start -- --reset-cache and then react-native run-ios worked for me.

I might add that on a OSX, check your hosts file contains:
127.0.0.1 localhost

I have no idea why, but that completely stopped the emulator working with the above error because my hosts file had that line commented out.

I had the same issue and I investigated what happened.

Note that I had Xcode version 7.3.1.

Looking at the error it was obvious that there is not app at the path:

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.

So I checked the path and noticed that in the folder: ./ios/build/Build/Products/Debug-iphonesimulator/ I had the app Awesome Project.app with a space in the name.

My suggestion is that you check the path that mentions the error and see if the build product path is different from the path the script searches for.

Instead of changing the project/xcode settings I tried to find the source of the issue in the react-native run-ios script.

I opened the script ./node_modules/react-native/local-cli/runIOS/runIOS.js and

I found this:

const appPath = `build/Build/Products/Debug-iphonesimulator/${inferredSchemeName}.app`;

This is weird as the inferredSchemeName variable name suggests that they are using the scheme name as the executable name.

Looking above I found the variable initialization:

const inferredSchemeName = path.basename(xcodeProject.name, path.extname(xcodeProject.name));

Then I said to myself I should get a coffee and I went and got one. But this is not important or related so let me get back to the story.

I investigated further and observed that the xcodeProject.name is the name of the .xcodeproj folder.

So the expected name of the app is not the executable name I have set and instead is an invalid name.

What I did to fix this? Something I'm not proud of: I changed the runIOS.js script to use the actual app path instead of the computed one.

const appPath = `build/Build/Products/Debug-iphonesimulator/Awesome Project.app`;

Yeah, I know, not good but I just wanted to run this for now.

Maybe this helps someone figuring out an actual fix.

Fixed in RN 0.38. Check out
https://github.com/facebook/react-native/blob/master/local-cli/runIOS/runIOS.js#L100

On Wed, Nov 30, 2016 at 7:07 PM, Tavi notifications@github.com wrote:

I had the same issue and I investigated what happened.

Note that I had Xcode version 7.3.1.

Looking at the error it was obvious that there is not app at the path:

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.

So I checked the path and noticed that in the folder:
./ios/build/Build/Products/Debug-iphonesimulator/ I had the app Awesome
Project.app with a space in the name.

My suggestion is that you check the path that mentions the error and see
if the build product is different from the folder the script searches for.

Instead of changing the project/xcode settings I tried to find the source
of the issue in the react-native run-ios script.

I opened the script ./node_modules/react-native/local-cli/runIOS/runIOS.js
and

I found this:

const appPath = build/Build/Products/Debug-iphonesimulator/${inferredSchemeName}.app;

This is weird as the inferredSchemeName variable name suggests that they
are using the scheme name as the executable name.

Looking above I found the variable initialization:

const inferredSchemeName = path.basename(xcodeProject.name, path.extname(xcodeProject.name));

Then I said to myself I should get a coffee and I went and got one. But
this is not important or related so let me get back to the story.

I investigate further and observed that the xcodeProject.name is the name
of the .xcodeproj folder.

So the expected name of the app is not the executable name I have set and
instead is an invalid name.

What I did to fix this? Something I'm not proud of: I changed the
runIOS.js script to use the actual app path instead of the computed one.

const appPath = build/Build/Products/Debug-iphonesimulator/Awesome Project.app;

Yeah, I know, not good but as I just wanted to run this for now.

Maybe this helps someone figuring out an actual fix.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/facebook/react-native/issues/7308#issuecomment-264037235,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAQi_zfCvgP-kgPAIpuEsGPRdHCnD_VTks5rDg-5gaJpZM4ITWVP
.

--
Stephen Potter,
Developer @ Vydia.com

I saw the same error about CFBundleIdentifier, and tried the above solutions which didn't work for me.

scroll up the console log little bit up, there was another error complaining about RCTSRWebSocket
which leads me to this working solution about removing a custom compiler flag in Libraries/RCTWebSocket:
https://github.com/facebook/react-native/issues/8584

I just updated react native and this started happening.

edit: I found the solution here https://github.com/facebook/react-native/issues/11265 @3dd13 check here if you have not already.

I never had this problem until this morning when I began a new project and tried a few of the solutions here with no success.

Then I noticed that after going through the fbsdk install steps in xcode I had a duplicate method declaration for:
application didFinishLaunchingWithOptions in my AppDelegate.m

I changed the latter one to application willFinishLaunchingWithOptions and the build succeeded. Future consequences? Guess I'll find out, *shrug

https://developer.apple.com/reference/uikit/uiapplicationdelegate

react-native-cli 1.3.0
react-native 0.39.1
npm 3.10.9
node 7.2.1
macOS Sierra 10.12.1

XCode: 7.2.1
react-native-cli: tried both 2.0.0 and 1.3.0
react-native: 0.39.2
OSX Yosemite: 10.10.5

Again, just followed the steps of init and run-ios

First Error

Get two different errors depending on where I'm running it from. The first is the :CFBundleIdentifier issue.

While @dmitrye and @brianneisler solutions are awesome and thorough, they didn't work for me. @dmitrye the {project}.app didn't exist in that directory.

Second Error

If I try to run in XCode I get:

screen shot 2016-12-16 at 3 29 19 pm

Update

Upgrading to sierra and commenting out the line like @veacks snippet worked: https://github.com/facebook/react-native/issues/7308#issuecomment-267643715

react-native upgrade works for me.

react-native : 0.34.1
node: v4.4.1
npm: 4.0.5

After commented the case UIUserInterfaceIdiomCarPlay directly in Xcode on OSX Yosemite, everything works fine for me.

image

I was on El Capitan with RN 39.2

This :CFBundleIdentifier exception disappeared once I upgraded from Xcode 7.1 to Xcode 8.2

For anyone that's using Xcode 7.x, e.g. because they haven't yet upgraded to Sierra, just try upgrading Xcode!

@caster8013 This Solution worked for me. X-code 8.2.1.

A possible cause is a malformed info.plist this can cause that not readable CFBundleIdentifier i think this is the reason for that some peoples says that after react-native upgrade works because replace plist with a new version of info.plist.

I discover this after remove a code that i was added to info.plist that i added recently.

I hope it helps someone :)

My issue was that even though I had newer versions of node installed, react-native was running using my default version of node, which was set to node version 0.10.0

I followed the error message in the new terminal that pops up, and set my default node version to 5.0 (which I had already installed with NVM, it just wasn't set as my default).

nvm install node && nvm alias default node
npm install -g react-native-cli
npm install
react-native run-ios

I had this problem.

The real cause is:

  1. react-native upgrade removes PRODUCT_BUNDLE_IDENTIFIER from project.pbxproj.
  2. In your Info.plist, you use $(PRODUCT_BUNDLE_IDENTIFIER) which becomes empty and will be removed from the compiled app's Info.plist. In the compiled app's Info.plist, there is no CFBundleIdentifier!!!

That's why it says ":CFBundleIdentifier", Does Not Exist. It really does not exist.

2 solutions:

  1. Use com.xxx.app instead of PRODUCT_BUNDLE_IDENTIFIER for CFBundleIdentifier in Info.plist
  2. Or, add PRODUCT_BUNDLE_IDENTIFIER back into project.pbxproj. It's something like PRODUCT_BUNDLE_IDENTIFIER = com.xxx.app;. You can add the bundle id in your app's Build Settings > Product Bundle Identifier.

I had this problem and I think @dragulceo had the best lead. Thank you.
If you've received this error, then you probably do not have the correct path for your application.

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

React Native has hardcoded it as part of their run-ios command in runIOS.js
build/Build/Products/${configuration}-${isDevice ? 'iphoneos' : 'iphonesimulator'}/${appName}.app

Unfortunately Xcode has different build paths depending on your configuration and on whether you are using an Xcode Project or Workspace. I believe the default path for an Xcode Project is build/Products.
I submitted this pull request 11899 to give programmers more flexibility from the CLI.

I had this problem and was able to solve it when I realized react-native run-ios was reading from the "wrong" project. In my case the clue was the first line of output when running react-native run-ios:

Found Xcode workspace BlahBlahTests.xcworkspace

This wasn't my main BlahBlah.xcodeproj but a test workspace I had put in the same directory.

As soon as I moved the BlahBlahTests.xcworkspace out of the ios/ directory and re-ran react-native run-ios it found the correct project and began compiling again.

@mankins You'll be able to configure your Xcode app path from the CLI with this pull request 11899 in the future. Will prevent you from having to actually move your files around.

npm start -- --reset-cache worked for me !

All the above didn't solve it. However, after launching in Xcode I followed the steps in https://github.com/facebook/react-native/issues/11265#issuecomment-265663635 and was able to get the simulator to work.

I had the same problem, running OSX 10.10.5 and xcode 7.

Upgrading to OSX 10.12.2 and xcode 8 fixed the issue for me.

The real problem isn't that we use to find these errors. Real problem is that this sh!t happens randomly. I've been developing the same project for 5 months, and now suddenly with absolutely no change it breaks miserably.

I understand this is a non-super-stable version: 0.X.Y
But then, stop promoting. Please. I wouldn't sell an unfinished car never.

P.S.: A bit overreacted, yes. Also, a bit tired.

@sospedra can you post your error message.

Yup @charlle here is the detailed info: https://github.com/facebook/react-native/issues/12080

Also I want to expose that I bump the xCode version and now works. Tho is very weird becuase it was working the old xCode for about 2 months without any trouble. And no RN deps changes: using 0.35 since day one.

None of the solutions above worked for me apart from opening the xcodeproj file in xcode and running the app from there. Frustrating!

I had the same issue. This solved it:

  • Clean the build
  • Open up the simulator and delete the app

http://stackoverflow.com/questions/26396166/unable-to-run-app-in-simulator

On OS X El Capitan v10.11.6

node --version v7.2.1
npm --v 3.10.9
react-native-cli: 0.2.0
react-native: 0.36.0
watchman --v 4.7.0
xcode: 8.0 (8A218a)

$ react-native run-ios

* BUILD FAILED *

The following build commands failed:

CompileC /Volumes/Data/Win_project/mp-mobile-starter/ios/build/Build/Intermediates/RNFS.build/Debug-iphonesimulator/RNFS.build/Objects-normal/x86_64/RNFSManager.o RNFSManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler

(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/ReactNativeStarterKit.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/ReactNativeStarterKit.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist


But it works during creating the initial project and building it as below.(In this time react native version 0.40.0).
$ react-native init AwesomeProject
$ cd AwesomeProject
$ react-native run-ios

By the way, the react native project built at version "0.36.0", why doesn't it work for me?

@HY523 you don't have your 'app' in the right folder.
Installing ios/build/Build/Products/Debug-iphonesimulator/ReactNativeStarterKit.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
Which folder/directory is ReactNativeStarterKit.app located?

Changing Xcode@7. to [email protected] works for me! Thanks!

Why was this issue closed? Nothing of the above helps

:CFBundleIdentifier error means that you version of Xcode does not support some of the features, which react-native provides (as an example, carplay).
First of all, make sure you are using the latest version of Xcode, when you use the latest version of react-native.
Second, install yarn. It will improve the management of your modules.
If you have node and npm installed, uninstall them and install again with brew.

Alternatively, you can downgrade your react-native. The goal is to find a version of it to fit your Xcode version.

Hey so at first I couldn't get react-native upgrade to work but then I saw that there was an invalid version number listed for react-native so I changed it to what my actual version number was and then the build succeeded

for me it helped

react-native 0.41.2

react-native upgrade;
react-native link;

rm -rf ios/build;

react-native run-ios

[now i got different problem, react-native-maps from airbnb do not work :( ]

This worked for me, from https://medium.com/@alberto.schiabel/react-native-on-xcode-beta-8-0-how-to-fix-initial-build-error-f0225c649850

  1. Start by opening your project on XCode
  2. head over to the RTCWebSocket project (in the TARGETS section)and double click it;
  3. in the build settings tab, select both “All” and “Combined” views
  4. look for “Apple LLVM 8.0 — Custom compiler flags”
  5. in the “Other C/C++/Warning flags” subsection just double right click and click, select the list entries and delete them tapping on the “minus” icon (please see the video below)
  6. click the run button (or press ⌘+R)
  7. you’re done!

CFBundle not found :
The solutions mentioned above did not work for me
and I didn't want to upgrade to another version because of dependencies.

In case you have dependencies on earlier versions, check to downgrade yours
first at package.json .
After that, try to delete the node_modules folder and re-install them with yarn install or npm install
next go to your ios folder and go pod install.
run react-native run-ios. If the error pops again check further up. Perhaps you will be able to see the output "* BUILD SUCCEEDED *".If thats the case then the only problem is that there has been a failure with initializing the application for the ios simulator.
Go in the simulator and run the application.
Thats what I had to do,
Hope it helps! :)

Xcode beta 8 stopped working a few days ago for me on a new, clean project (i.e. just after react-native init projectname). Upgrading to 8.2.1 got everything working again.

Upgrading react-native => 0.35.0 worked for me.

resolved by updated Xcode ☺☺☺☺

if you install two Xcode,please delete a Xcode.

I have installed two Xcode, which are 7.1 and 8.1 respectively, and will start the Xcode7.1 emulator at run time. I removed Xcode7.1, then run correctly

My environment:
react-native-cli: 2.0.1
react-native: 0.42.3
node: 7.3.0
npm: 3.10.10

AwesomeProject doesn't running and build failed.

* BUILD FAILED *

The following build commands failed:
PhaseScriptExecution Start\ Packager /Users/luca/workspace/pillsy/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/React.build/Script-006B79A01A781F38006873D1.sh
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/pillsy.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/pillsy.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

My-Mac:pillsy luca$ /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier ios/build/Build/Products/Debug-iphonesimulator/AwesomeProject.app/Info.plist
File Doesn't Exist, Will Create: ios/build/Build/Products/Debug-iphonesimulator/AwesomeProject.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
My-Mac:pillsy luca$ /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier ios/build/Products/Debug-iphonesimulator/AwesomeProject.app/Info.plist
File Doesn't Exist, Will Create: ios/build/Products/Debug-iphonesimulator/AwesomeProject.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

I tried all solutions but doesn't working...

@zhiyong888 Xcode version?

I'm using latest version.

XCode: Version 8.2.1 (8C1002)

nothing is working for me either
using react-native 0.42 and Xcode 8.2.1

react-native-cli: 1.0.0
react-native: 0.42.3
xcode 8.2.1

Works great!

Update watchman, react-native, xcode.

I got this error when I changed my name from org.abc.xyz to com.reimertz.something which seems to have broken paths.

@brianneisler Your soloution saved my life. Thanks 🙏

Hey guys, I might have found a possible solution for this. Worked for me on my 2 Mac computers.
I had to:

  • update node
  • update npm
  • clean my npm cache
  • delete my project's node_modules and download it from 0.
$ npm cache clean
$ sudo n 6.
$ sudo npm install -g [email protected]
$ sudo npm install -g npm@next
$ sudo n 7.

$ cd ./your_project_folder/
$ rm -rf ./node_modules

My current environment after updating everything:
Node 7.8.0
NPM 4.4.4

I've tried everything people posted here on my 2 macs and nothing worked. Only after going through the above steps I was able to fix my projects once and for all. Hopefully it might solve your issue too!

This method works for me. Init your project with a lower RN version:

" react-native init --version="0.38.0” AllTheBestApp "

I just got it working. I had to update Xcode to 8.2.1 (the latest version supported on El Capitan), and then (IMPORTANT!) had to remove the build directory. When you try any of the solutions above, be sure to remove your iOS build directory before running again:

rm -rf ios/build/
react-native run-ios

FWIW, I didn't have to change the Project scheme or remove any compiler flags. Here's my setup:

  • react-native-cli: 2.0.1
  • react-native: 0.42.3
  • node v6.10.1 (via nvm)
  • npm 3.10.10
  • OS X 10.11.6 (El Capitan)
  • Xcode 8.2.1

I am experiencing same issue. I have latest xcode and El Capitan

just use Xcode run project/ios/project.xcodeproj and retest react-native run-ios

upgarde XCode to latest (8.3.2) !!

If you have this problem after renaming your application, follow these steps :

Optional :

  • Delete your ios and android folders.

Do :

  • Run this command : react-native upgrade,
  • Install this package react-native-git-upgrade and run react-native-git-upgrade in your project.

Actual dependencies

"react": "16.0.0-alpha.6",
"react-native": "0.43.4",

I'm not sure this issue should be closed. I am running Xcode 8.3.2 (8E2002) on macOS Sierra (10.12.4).

I have tried every single thing suggested above, with the exception of wiping out ios/ and android/ because I have made changes to each because of custom native integration code. I've changed my bundle identifier. I've wiped out ios/build. I've done a react-native upgrade but preserved most of my android files due to changes I made. I removed those two flags from the LLVM 8.1 setting.

I can run the app if I open Xcode and do a CMD+R but react-native run-ios fails with:

** BUILD SUCCEEDED **


Installing build/Build/Products/Debug-iphonesimulator/TeamCoco.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/TeamCoco.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Pulling my hair out over here...

EDIT: After more time debugging I realized that the next-to-last line is the cause of problems. react-native run-ios is trying to run PlistBuddy against build/Build/Products which doesn't exist. It should just be using build/Products. I have no idea how to change this dir value.

@johndanek I have the same problem. I noticed that I have an error with watchman in the launchPackager.command

Xcode version 8.2.1
"react": "16.0.0-alpha.6"
"react-native": "0.44.0"
 ERROR  watchman --no-pretty get-sockname returned with exit code=1, signal=null, stderr= 2017-05-03T14:02:20,731: [2095001600] while computing sockname: failed to create /usr/local/var/run/watchman/foobar-state: No such file or directory

Error: watchman --no-pretty get-sockname returned with exit code=1, signal=null, stderr= 2017-05-03T14:02:20,731: [2095001600] while computing sockname: failed to create /usr/local/var/run/watchman/foobar-state: No such file or directory

at ChildProcess.<anonymous> (/Users/foobar/Projects/Mobile/finantrack_mobile_client/node_modules/react-native/node_modules/jest-haste-map/node_modules/sane/node_modules/fb-watchman/index.js:198:18)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:194:7)
    at maybeClose (internal/child_process.js:899:16)
    at Socket.<anonymous> (internal/child_process.js:342:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at Pipe._handle.close [as _onclose] (net.js:504:12)

restart computer is work for me。 The reason is maybe there is 1 project running.

@johndanek PRODUCT_BUNDLE_IDENTIFIER might not be set in project, in which case the CFBundleIdentifier will be empty in Info.plist

In my case, it was because I still had the package manager running from a different react-native project. In other words, if you do a react-native run-ios in project A's folder, the package manager gets started for that application. However, if you then switch over to project B without closing the package manager window and then try to start project B with react-native run-ios, then you can get this "CFBundleIdentifier, Does Not Exist" error because the package manager is still associated with project A.

The solution is to be sure to close the package manager window for the current project if you are switching to a different project.

Hope this helps someone.

I tried everything and nothing worked... Until I restarted my computer. Hours of debugging and restarting my computer was the trick!

Reinstalling my node_modules did the trick

What worked for me:

run
npm start
from a terminal

Then from XCode run the project like you would run a native iOS project. Some errors pop up in the auto-generated code (weird?).

I commented the code that caused the errors and then everything worked ok.

Ok, so what I did to fix it
Run this in project directory
$ npm install -g react-native-git-upgrade
$ react-native-git-upgrade
This will update your project to latest React Native, worked for me

Thanks

These help a lot.
https://github.com/facebook/react-native/issues/7308#issuecomment-228638046
https://github.com/facebook/react-native/issues/7308#issuecomment-230198331

vi node_modules/react-native/local-cli/runIOS/runIOS.js
https://github.com/facebook/react-native/blob/master/local-cli/runIOS/runIOS.js#L18

make sure which one is existed and find it

ios/build/Products
ios/build/Build/Products

@zongwan I set Custom to Relative Path and set build/Products value because I have ios/build/Products. That was your case ?

But in your link I see

const getBuildPath = function(configuration = 'Debug', appName, isDevice) {
  return `build/Build/Products/${configuration}-${isDevice ? 'iphoneos' : 'iphonesimulator'}/${appName}.app`;
};

So I miss something?

@gigeos
Yes, so I restore it in Project Settings.
Custom to Workspace =>>> Xcode Default

At last : ios/build/Build/Products


My mistake, wrong line in my last comment.
fixed it => https://github.com/facebook/react-native/blob/master/local-cli/runIOS/runIOS.js#L18

Solve it! For information:

  • I use RN v 0.44 (the latest)
  • I setted $(PRODUCT_BUNDLE_IDENTIFIER) for Bundle Identifier in info.plist (Xcode 8.3)
  • I set the bundle identifier in general -> Bundle Identifier (e.g. com.mybundle.identifier)
  • Then run build again with Xcode (which will fail)
  • then run commandreact-native run-ios with success !

I had an issue with McAffee Agent running on 8081 port fixed it with un-install and reboot :
https://community.mcafee.com/thread/94244?start=0&tstart=0

I installed the newer version of Xcode but for some reason still had an older version around as well. There's a config file somewhere that specifies which version to use. You have to update it by running xcode-select --switch "/Applications/Xcode.app/Contents/Developer/"...and finally the build SUCCEEDED

chaning product inside build settings solved my problem. I changed it to the one that it was searching for.

Got the same problem, these steps help me:

  • upgrade reactive-native
  • open project by Xcode, adjust/use a correct signing certificate

Same problem. use all solution above but not work.wtf.

VinceXie , same.
And run the project in Xcode is good , just cannot run as "run-ios".
Try all the answers dose not work.

I fixed my issue, you can try it if you are in the same condition.

I encountered the same error() when I clone an existing react-native project from https://github.com/bonniee/learning-react-native.

  1. I initialize(using ) a new project with the same name in a different directory

  2. copy every useful *.ios.js file to this new project from the one I clone elsewhere.

TADA, this works for me.

唉,已经爬坑太久,收集了很多异常处理情况。累觉不爱呀 ~~~
其实造成 ":CFBundleIdentifier", Does Not Exist 的问题很多。请看终极解决办法
https://hacpai.com/article/1497235254333 iOS -> 'React/RCTBundleURLProvider.h' file not found

I had the error:

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

I found the issue: do NOT use space in your project path!

@florismettey your solution saves me man!!! I have tried all of the provided solutions but only this works for me. Thanks so much!

same here

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

The solution that worked for me on macOS Sierra:

  1. Downgrade React and React Native in my package.json to the following versions:
// package.json
"dependencies": {
    "react": "16.0.0-alpha.6",
    "react-native": "0.44.0"
}

This solution was found here;

  1. Running watchman watch-del-all; npm start -- --reset-cache;

After these two steps, I could run react-native run-ios without a problem.
My global react-native's version is 0.44.0 and my react-native-cli's version is 2.0.1.

Hope it helps!

There is something wrong with react-native init

Please do not initialize the project with react-native init ProjectName

You should append react-native version argument in the end.

For example:

react-native init ProjectName --version 0.44.2

@renguochao 's solution works for me, thanks.

@renguochao's solution worked for me as well.

I get this issue be fix for me by doing the following:
1) downgrade xcode to 7.3.1
2) upgrade react-native to 0.38.0
3) cd ios/ and run pod install again
4) run react-native run-ios

I solved this issue by remove the file which is .rncache under the path of /User/yourAccount and run react-native run-ios again

@renguochao's solution worked for me. Thank you!

Still an issue for me (tried everything >_<)

confirmed @renguochao solution worked for me.
react-native init ProjectName --version 0.44.2

@renguochao's solution worked for me , Thanks
react-native init ProjectName --version 0.44.2

@renguochao 's solution did not work for me

The solution of a lower version works for me, but because of issues I'm having with cocoapods, I really need to be able to use 0.45.0 or higher. Kind of trapped now :/

I fixed mine by telling Xcode that the file paths are relative to the workspace, not absolute.

in Xcode:
File > Project Settings (or Workspace Settings)
Advanced
Custom > Relative to Workspace
changed Build/Products to build/Build/Products
changed Build/Intermediates to build/Build/Intermediates

Works now for me.

Weirdly, the solution for me was NOT having a folder with space down the path to the project. 👍 for Facebook.

Specifying RN version to 0.44.2 makes run-ios work normally, but still have no clue why the latest version doesn't work. Thanks @renguochao

I was able get it working by opening node_modules/react-native/React/Views/RCTScrollView.m and replace on line 361 with

- (void)setRefreshControl:(UIRefreshControl *)refreshControl
{
    if (refreshControl) {
        //[UIRefreshControl removeFromSuperview];
    }
    refreshControl = refreshControl;
    [self addSubview:refreshControl];
}

This is bug which was fixed here https://github.com/facebook/react-native/issues/8472

Probably updating to a newer version would fix the issue too.

I also met this problem.My question was a file did not download completely which is named boost_1_63_0.tar.gz .
You can use cd .rncache in terminal.
If your boost_1_63_0.tar.gz is just few B, you should download this file buy yourself and replace it. Now boost_1_63_0.tar.gz in my file is 78M.
I hope it can help you.

You guys should check Google's React-Native clone Flutter (alpha) https://flutter.io/setup/ if you follow the setup it will actually compile without errors for both iOS and Android!

I blew away the project folder, re-initialized as per @renguochao 's solution: react-native init ProjectName --version 0.44.2 works now

I had the very same issue recently. I followed (I think) all possible advises, including changing xcode path inside of a project, clearing watchman etc. My OS was El Capitan and Xcode originally 7.1. I upgraded xcode to 7.31, nothing changed. Then, I upgraded my instance to MacOS Sierra & installed xcode 8.3.2. The same projects that I have been working on before, WITHOUT making any changes to project files, are now running with no problem. Hope it helps!

Update
The problem is still there, this time when I clone my repos from Android development environment, despite the Xcode update. I found workaround, which is:

  1. creating another, clean project and then removing node_modules,
  2. copying over the src dir
  3. adjusting name in the old project files to the newly created one, basically "plugging in" old project
  4. installing project again

Probably will write script for it, but its not good solution (just working one, able to test).

@renguochao solution worked for me. If you initialize a new project, use react-native init ProjectName --version 0.44.0 . But this problem happened when you clone other's project, you need change react-native version to 0.44.0 in package.json file before input 'npm install' command in terminal.

@Vanessa219 还是我国人牛逼,我直接把react-native/third-part删除,遇到boot那个文件不存在错误时候再rnCache手动放入文件,然后解决问题了,wonderful !

@Vanessa219 Thank you!Nothing work for me but your solution!

Same error here, but tried everything suggested here, and none solved!

Xcode Version 8.3.3 (8E3004b)
react-native-cli: 2.0.1
react-native: 0.45.1

```* BUILD FAILED *

The following build commands failed:

CompileC /Users/DiMacBook/Documents/DEV/CursoReact/teste/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/third-party.build/Objects-normal/x86_64/Bits.o /Users/DiMacBook/Documents/DEV/CursoReact/teste/node_modules/react-native/third-party/folly-2016.09.26.00/folly/Bits.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler

(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/teste.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/teste.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist```

this blog's resolution works for me : CFBundleIdentifier", Does Not Exist

@whoyoung 那你有没有英文的翻译 😆

@cuiyueshuai 也是顺着报错信息一路探查下去才发现的 😄
@wy1009 很高兴能帮助到能,你居然能看懂中文,👍
@dey-dey 可参看 React Native 系列【异常】- iOS

@dey-dey Summarily, i encounter this problem when i create a new RN project with react-native version 0.45.0. And, i never encounter this problem before react-native version 0.45.0. So, downgrading react-native version to version 0.44.3, meanwhile, downgrading react-native's dependency - react 's version to 16.0.0-alpha.6.
Step:

  1. Delete the folder named "node-modules";
  2. Open package.json, then replace
"react": "16.0.0-alpha.12",
"react-native": "0.45.0"

with

"react": "16.0.0-alpha.6",
"react-native": "0.44.3"
  1. run "npm install"
  2. run "react-native run-ios". After run this script, may still show the same problem, take it easy, just follow the step 5.
  3. open project use xcode, the click Run, your project will run correctly.

@Vanessa219 @whoyoung 谢谢你帮我,我的中文还不高级的

I just used the cli to generate an app and had to revert waay back to these versions as no solution here worked for me:

  1. rm -rf ./node_modules
    2 update package.json
{
    "react": "15.3.2",
    "react-native": "0.37.0"
  }
  1. npm install
  2. react-native run-ios
    (there's probably a better solution - like newer version that works, but I didn't want to waste my time as this was the one I got working first - > See this package json for details -
    > https://github.com/browniefed/examples/blob/todo/layout/todo/package.json

react-native init ProjectName --version 0.44.2 works for me!

@dey-dey

  • Delete ~/.rncache after re-download, or manually download into ~/.rncache
  • Extract the above files into your_project/node_modules/react-native/third-party
  • Clean & Build

@udoless sadly it didn't worked!

react-native init ProjectName --version 0.44.2 worked for me

after trying almost all solutions posted in this issue, this one is working on mine!

react-native init ProjectName --version 0.44.2

my environments:

 - node v6.9.5
 - npm 3.10.10
 - xcode 8.3.3
 - macOS Sierra 10.12.5

Encountered this problem until I googled and found this https://github.com/GeekyAnts/NativeBase/issues/936 The root cause happened to be other commands that failed, resulting in the build not being successful. Hence the cfbundleidentifier error message is just a symptom rather than the root cause. I guess many here have some other problems resulting in the build failing and the last error message is what they think is the root cause. Maybe looking more at the output helps? There could be multiple ways the build fails leading to this last message.

@novalagung and Gringox are right.

react-native init ProjectName --version 0.44.2

works for me today: 2017.7.6

i have tried 0.45, 0.46, they got same problem.

Searched through the node_modules directory for every mention of port 8081 and changed it to something else. I mean, EVERY FILE. Then I deleted the .babelrc file at the root and ran react-native run-ios again and everything FINALLY worked. That was ridiculous. Took me 4 hours to solve... and all because stupid McAfee uses 8081 and apparently it takes a fricken act of Congress to uninstall McAfee on Mac. So dumb.

Tried everything in this thread, nothing is working

Tried RN v0.44.0, 0.44.1, 0.44.2, 0.44.3, and 0.45.0
Tried React v16.0.0-alpha.6, and 16.0.0-alpha.12
Node v7.10.0

Edit: Upgrading to RN 0.45.1 and reverting React back to the original version worked for me (make sure it matches your lockfile) worked

The version of React native strictly depends on the version of your Xcode, React, and React native version - I found this when upgrading Xcode from 7.3 to 8.0 and then to the latest. 7.3 works well 15.3.2 React and 0.37 native. Xcode 8.1 works well with the latest of The cli as of Monday this week. For future reference, keep your Xcode up to date and use the cli to see which version is compatible

I had this issue and I tried to run Xcode build. Found out the build failed due to https://github.com/facebook/react-native/issues/8472. Fixed it, fixed my problem

cannot believe 0.46.1 still have this issue, using 0.44 for now, but hope it will be fixed in newer release soon...

I resolved this issue.

The key of this issue is ...build/Build/Products/Debug-iphonesimulator/*.app.
Obviously, the run-ios command needs the Compiler to export the App to build/Build/Products in Debug mode.

So, you need make sure that:

Build Location is build/Build/Products, not XCode Default, neither Build/Products.
You can find this settings in XCode's File > Project Settings > Advanced

Build Configuration is Debug, NOT Release
You can find this settings in XCode's Product > Scheme > Edit Scheme > Run.

if your configuration is Release, Compiler will export the App to ...build/Build/Products/Release-iphonesimulator/*.app, run-ios still can't find it.

But 0.44.0 uses the same build location as 0.46.1, Debug-iphonesimulator, no problems there...

I meet this issue after my XCode updated, so I think the problem was XCode, not react-native, and I resolved my problem.

There may have other cases I have not run into.

try user yarn to download dependencies

This issue has been running since 2016 and still getting this issue. No solution above has solved it for me.

react-native-cli: 2.0.1
react-native: 0.46.1
npm: 4.2.0
node -v: 6.9.1
watchman: 4.7.0
xcode: 8.3.3
Mac 10.12.5

Create new project with different location with same name, clone code.
It works like a charm then move it to the old path then got this error again.

It's weird. I think the path has been cached somewhere.
Eventually, i have to give up the old path then work with the project on the new path instead.

Its all about Luck, Some solutions working for someone but not for anyone else, Ridiculous Good Job React native

if you want to resolve this problem using the new react native verison, you can try this follwing resolution:
click here to download third-party.zip file (or clone or download my demo , third-party.zip is in the demo's root directory), then unarchive third-party.zip file to
the directory of "third-party" . The path of "third-party" is like this: yourProjectRootDirectory/node_modules/react-native/third-party/ . Finally, open your project using Xcode, click Run.
More detail can click here

=== BUILD TARGET NewProjectTests OF PROJECT NewProject WITH CONFIGURATION Debug ===

Check dependencies

* BUILD SUCCEEDED *

Installing build/Build/Products/Debug-iphonesimulator/NewProject.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/NewProject.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

wht to do

ROFL, @dragulceo hit on the solution that worked for me. I opened a project giving this error in xcode, and noticed that it was blowing up when it couldn't find the directory for some file, and noticed that it was looking for a directory truncated by a space way up in the path. I just re-initialized the project to a directory with no spaces in its path and all was well.

So react native build scripts as of react-native-cli: 2.0.1, react-native: 0.46.3 can't handle spaces anywhere in the path leading up to the project.

Here's what I get.

 Node v8.0.0
 react-native": 0.46.3
 XCode Version 8.3.3 (8E3004b)

when I run react-native run-ios --simulator="iPhone 7" I get the following error


=== BUILD TARGET third-party OF PROJECT React WITH CONFIGURATION Debug ===

Check dependencies


** BUILD FAILED **


The following build commands failed:
CompileC /Users/tharaka/Documents/Projects/Abiling/AbilingApp/ios/build/Build/Intermediates/RCTText.build/Debug-iphonesimulator/RCTText.build/Objects-normal/x86_64/RCTTextView.o RCTTextView.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/AbilingApp.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

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

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

react-native upgrade fixed it for me

I had the same issue and I tried all the fixes in this thread, but none worked for me. So, I opened my project in Xcode and it showed me a couple of errors in the /node_modules/react-native/third-party/boost_1_63_0/boost folder. There were so many empty folders and I searched on the internet and downloaded the boost again and replaced it. My project is running fine now in Xcode, however, if I tried to run it in terminal, I am now getting this:

* BUILD SUCCEEDED *

The following commands produced analyzer issues:
Analyze /Users/Kash/ReactApps/prod/albums/node_modules/react-native/ReactCommon/yoga/yoga/YGNodeList.c
Analyze /Users/Kash/ReactApps/prod/albums/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.c
(2 commands with analyzer issues)

react-native upgrade work for me.

I was using PODS. I deleted the xcworkspace file and ran 'pod install' again. That fixed it for me

every solutions tried, nothing worked for me :(. but don't give up~

Then i installed cocoapods, get into the ios folder, run pod install.but it still can not find some import file(which seems to be a bug of react-native 0.44), so i get a npm script from other people :
"postinstall": "sed -i '' 's/#import <RCTValueAnimatedNode.h>/#import \"RCTValueAnimatedNode.h\"/' ./node_modules/react-native/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h",
an run it. then it fixed.
if you can not run with npm start, try to reinstall watchman

I tried everything but I had no luck. In the end I completely reset my iOS simulator and it all worked again. In the iOS Simulator top menu, click Reset Content and Settings.... Then run react-native again. Hope it helps.

Hey guys,
DO NOT use space in your project path .... it solved my problem.

@renguochao solution worked for me, thanks.

After I have spent a whole day trying to follow every possible suggestion, I took a detailed look on my terminal finally ! :)

So here is what was my problem:

Above :CFBundleIdentifier", Does Not Exist error i had another one that stated that lRCTBEEPickerManager module was not able to install, so I open my Xcode project => Build phases= > Link Binary with Libraries

I removed the stated module (lRCTBEEPickerManager) and error was gone.

Hope this will help someone.

Tried almost all the fixes given in this thread. Some fixed my issue, some didn't. A friend of mine who worked in Facebook, told me to must have YARN installed in my system before creating the project with react native cli. Now everything works smoothly and I don't have to perform all these fixes for any new project.

Hey guys, I've managed to solve this frustrating thing in two steps:

  1. rm -rf ~/.rncache
  2. install again react-native cli npm install -g react-native-cli

After this, init a new project and hit react-native run-ios, it should be working.
Hope this helps you!

I have the same error too.

My setup:

  • xCode 8.3.3
  • Node v8.3.0
  • npm v5.3.0
  • react-native v0.47.1

I solve it , running my App from Xcode. I don't know why not work from console (react-native run-ios)

Regards,

downloaded a project from GitHub and faced the same problem.
I don't know much but I have solved using these steps:
step 1: delete node_module
step 2: delete build folder
step 3: npm/yarn install
step 4: react-native upgrade
step 5: react-native link
now you can react-native run-ios/android

I was able to solve it by running "react-native upgrade".

Please Check all folder name from root Directory , the folder name should'nt have any space. If it has space Xcode wont take, it will create this error in build stages.

I also came across this issue as well and none of the above solutions worked for me. Until I found a way to fix.

Here is what i did:
1) Make sure there is no white spaces in the file directory.
2) cd
3) run command 'react-native upgrade'
4) Go to native ios folder and open xcode project.
5) Go to File > Project Settings > Advanced...
6) select custom > Relative to workspace
7) products path should be 'build/Build/Products'
8) intermediates path should be 'build/Build/Intermediates'
9) now try running command in your terminal 'react-native run-ios'

I hope that this solutions will help some of us facing this issue.

I had the same problem and solved it like this.

  1. I moved project folder to root ~ (To exclude white spaces in the path)
  2. Removed folder ProjectName/ios/build
  3. react-native run-ios

All you need to do is
1.run react-native init project

  1. cd project
  2. npm install
  3. react-native run-ios and you should be golden!

try

  1. react-native init ProjectName --version 0.44.3
  2. sudo chmod -R 777 ProjectName
  3. react-native run-ios
  4. react-native run-android

Got this to work:
adjusted like as @gvlamadrid said
THEN delete the build folder rm -rf ios/build

Same issue with react-native 0.48

@crajesh238 - did you try what I said about adjusting then blowing away the build folder?

I am having the same issues, no error message and I have tried all the options provided... any other ideas?

Try to update or reinstall all stuff globally:

  • node
  • npm / yarn
  • react-native-cli
  • xCode
  • Expo (if are you use it)

@arun0009 worked :)

I upgraded the whole react-native ecosystem with npm install react-native-git-upgrade and react-native-git-upgrade and finally it worked for me :)

For me it was as simple as killing all processes on port :8081. Hope this helps someone else.

Question:
'boost/iterator/iterator_adaptor.hpp' file not found’ and ":CFBundleIdentifier", Does Not Exist

Reason:

  • /Users/Vanessa/.rncache boost_1_63_0.tar.gz, double-conversion-1.1.5.tar.gz, folly-2016.09.26.00.tar.gz, glog-0.3.4.tar.gz ---this file download incomplete

Solutions:
step1: you need delete .rncache,specific as follows
--> rm -rf node_modules && rm -rf ~/.rncache && yarn
step2:--> npm install
step3:--> react-native upgrade
step4:--> react-native run-ios

To me the solution was to set in Xcode the Build Active Architecture Only to Yes. Xcode Project > Build Settings > Build Active Architecture Only > Debug > Yes.

For me Setting the Build Location to unique did the trick,
XCode->Preferencec->Location->Advance->Build Location->unique

  1. Install react-native updated
    npm install -g react-native-git-upgrade

  2. Update react-native
    react-native-git-upgrade

  3. Run it with sudo
    sudo react-native run-ios

Just wanted to add that ejecting either from Expo or CRNA still does not work properly. Or it is not documented properly. Have tried lots of solutions, eventually came to this step, but not really have the time to play with it atm.. Will just use good old react-native-cli to start a project for now.

I received this error when I cloned a completely working project from Github to a different directory on the same machine. I thought it might be an issue with linking native modules, but when I ran react-native link, it said everything was linked. I have not yet found a solution.

react-native init ProjectName --version 0.44.2
react-native run-ios worked

for my case, I hard code the CFBundleIdentifier in the Info.plist and it's working back.

<key>CFBundleIdentifier</key>
<string>com.example.myapp</string>

I found solution:
react-native init AwesomeApp --version 0.44.3 react-native run-ios
OS version: High Sierra
node: 7.1
react-native-cli: 2.0.1

I faced the same issue and found that it was build folder permissions issue. Finally it is resolved by assigning write permissions to ios/build and all the child folders.

chmod 777 ios/build

Make sure all nested folders inside ios/build have write permissions as well.

whatever the methods we have here, react-native upgrade worked for me.

For us, it was glog was having issues because the configure script was checking for special characters. We had a special character in a parent folder which caused a host of problems. Notably:

  • glog didn't finish compiling
  • because glog didn't compile, config.h wasn't created

If you have the originally mentioned problem, try:

  • going into ${yourProject}/node_modules/react-native
  • remove ./third-party/
  • see if running scripts/ios-install-third-party.sh has any issues

That should at least give you an error you can use to track down the problem.

Also, as often as this seems to be faced, would it be worth adding to the troubleshooting page?

downgrade react and react-native work for me :)

path is wrong in runIOS.js, has one Build segment too much
Should be:

const getBuildPath = function(configuration = 'Debug', appName, isDevice) {
  return `build/Products/${configuration}-${isDevice ? 'iphoneos' : 'iphonesimulator'}/${appName}.app`;
};

@hazam, well on my build, it is placed under build/Build. However, @brianneisler 's solution doesn't work either for me. I'm on XCode 9 and simulator for 6s. My project runs ok when started from XCode, but not when using react-native run-ios. It builds successfully, installs on the simulator, then opens and immediately closes again.

I was running into this same issue after renaming my app, removing the iOS/Android directories, and running react-native eject. And when I tried opening the .xcodeproj file that was newly generated, Xcode wouldn't open it.

My fix was to change "name" in app.json so it didn't have any spaces (my app name has 3 words). Spaces in "displayName" are ok.

Upgrading node to 8+ solved this for me.

I ran react-native run-android instead and it worked like a charm!

I noticed that this does not happen when running the packager (yarn start) myself vs react-native run-ios running the packager + launching the simulator.

react-native run-ios will put your project in a broken state; the following appeared to solve it for me, and makes react-native run-ios safe again.

  1. update .watchmangconfig to be an empty object: {}, like the template here.
  2. destroy all the things: watchman watch-del-all && rm -rf node_modules && yarn install && yarn start -- --reset-cache (use npm instead of yarn if you're like that.)
  3. react-native run-ios

In my project, this error is caused by git.
Git pull did auto merging but not successfully mergied.

I fixed it by using Atom open info.plist.
Search keywords >>>>>> or HEAD or >>>>>> HEAD, fix conflict, save, done.

Silly enough, but in my case a simple rebooting solved the issue.

@malikmani thanks ,this worked for me.
but firstly,I created a folder named assets in ios folder

After Ejecting from Expo. I had the same issue and tried all the solutions for almost half a day but none of them seemed to work for me.

This is what WORKED for me:

1.) Moved the project to the root (~) directory (Am using Mac with High Sierra), just to avoid spaces or any related issues.
2.) Removed "Project/ios/build" folder
After the above 2 steps, I was able to build the project, but Expo seems to load the app in its own views by loading it from server it seems, so i was being displayed this error: "Could not connect to the server...".

_Then finally, did this:_
3.) Added "DEBUG=0" flag in build setting inside ExpoKit pod.

expo eject issue - resolved

I can understand that React Native is not mature enough, but didn't expect to lose half a day on this silly thing.
Hope it helps someone!

Metro bundler did not start on my first attempt, simply executing react-native run-ios again opened another terminal window and started Metro Bundler and it just worked on simulator.

This is with;

react-native-cli: 2.0.1
react-native: 0.51.0
osx 10.12.6
xcode 9.1

The suggestion by @consideRatio worked for me!

If you open the xcode project and try to build, there could be an unrelated error that's throwing this message.. (this was the case for me). I found that there was a missing font file. Hope this helps.

I resolved this with this comment after trying every solution under the sun.

  1. delete ios/ or android/
  2. react-native eject <-- this was what did it for me
  3. react-native-git-upgrade
  4. react-native link
  5. react-native run-ios

I finally solved mine by doing the following.
1) react-native upgrade and select 'y' for all the questions.
2) delete the build folder present inside the ios folder
3) finally react-native run-ios

FYI: before following the above 3 steps I also tried upgrading using the commad react-native-git-upgrade

Hope it helps someone...

Solution:

  1. remember link your package >> react-native link
  2. upgrade your react-native version 
>> react-native-git-upgrade

react-native upgrade => replace all !!! remember ue-link again(ref to 1.)

  1. watchman watch-del-all
  2. remove node module and reinstall, remove ios/build and re-build.

My solution to this is cd ios && pod install

Then it works fine

I had to unlink a library using react-native unlink

I have tried everything but no success.
In my case , IOS build getting succeess and after that getting error.

** BUILD SUCCEEDED **
The following commands produced analyzer issues:
    Analyze /Users/shyam/projects/master-chat-app/master-mobile-chatbot/node_modules/react-native/ReactCommon/yoga/yoga/YGNodeList.c
    Analyze /Users/shyam/projects/master-chat-app/master-mobile-chatbot/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.c
    Analyze Base/RCTModuleMethod.mm
(3 commands with analyzer issues)

Installing build/Build/Products/Debug-iphonesimulator/mastermobilechatbot.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/mastermobilechatbot.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Any help?

@shyam528 I had a very similar error message to you, notably with errors related to yoga. I needed to:

cd ios
pod update yoga

Before I was able to do that, I had to reinstall cocoapods, and before doing that I needed to upgrade to ruby 2.4.2.

Looks like this is an issue with _Xcode Build Location_. Try switching it to Unique under Xcode -> Preferences -> Locations -> Advanced.

I had this same problem, I think it was caused by updating my pods after I had initialised the react project. To fix I loaded up my xproj from my IOS folder - saw lots of warning symbols, double click each one and select "Perform Changes" until they're all gone. I think they swap the configuration for the updated Pods. After I did that it just worked fine with react-native run-ios

To add to @robertkent's comment, I also ended up doing a lot more fighting because I had the wrong version of a Pod in the cocoapods cache for some reason -- so Cocoapods would think it was installing a certain version of a Pod while it was actually installing a different version, even though I cleared all the pods out of my project folder.

To clear the cache, using this comment helped: https://gist.github.com/mbinna/4202236#gistcomment-1814665

I also removed the pods cache that was in my user directory (~/.cocoapods), but I don't know if that was required. Cocoapods seems to have several layers of caching, which was a big pain for me.

nothing works........ >=( Everything worked yesterdayf then I had trouble with that new fency Ionic Library I got recommended by React Native official guides. To get this installed I had to face 100 new errors, I endet up removing some stuff I am not sure what it was doing (thanks docs) and now nothing works anymore. I have been sitting on this issue now for the last few hours, it's 2:10 AM and I have to get up in 4 hours to drive to work but I can not sleep now because nothing works

@MrIceman When I had this issue before I tried all of these solutions and nothing worked. I think what I did was I built a brand new project and installed every plugin one by one to determine which ones were giving me the error.

Well I just updated react-native-navigation and react-native-camera and I got the dirty error again, so look into those plugins.

If you have updated React-native, you have to also update yoga from pods.
This worked for me after updating RN to 0.54.0.
cd ios && pod update yoga

it turns out to be 8081 was in use
nginx -s stop worked out for me.
Lol

I have just faced the issue and I got it solved by removing and reinstalling react-native-cli

which react-native
rm -R /usr/local/bin/react-native
npm install -g react-native-cli
react native init myapp
cd myapp
react-native run-ios

I hope it helps

7308 (comment) did finally work for me.

Updating react using react-native upgrade and overwriting all iOS files is what worked for me!

It happened to me in iOS after I removed a package from package.json and executed npm install . To solve I had to install the package again. I guess I have to find the way to unlink it properly.

In Android I had no problem

This works to me:

rm -rf ios/build/

Just remove the build folder and build the project again. Then, it works fine.

Downgrading from react-native v0.55 to v0.54 worked for me

I had to downgrade allllll the way to v0.52.0. The only version that works for me

react-native v0.55.0 has a problem with this actually. Wait until the fix. https://github.com/facebook/react-native/issues/18681

I tried everything above but nothing worked.My xcode version was 8.3.2.So when I downgraded react-native to react-native v0.50.4 from 0.55.0, it worked.On another laptop I tried where xcode version was 9.3 and react-native v0.55.0 worked perfectly there.

same.
Xcode 8.2.1
node v9.3.0

last version of react-native failed to build (0.55.2, 0.55 , 0.54 )
but with react-native 0.53.0 it's ok :

react-native init MyApp --version "0.53.0"

react native need specific the RN version: xcode version require, node version or something
for example: rn 0.54 need xcode >9.1 , node >6.5 and android sdk >24 (maybe others dependencies)

i have migrated my macbook from captain to sierra.
On sierra, the last version xcode (9.3) can be installed.
and now react-native works.

Adding, it works for me, when nothing above fixes:

  1. Install react-native-git-upgrade and update your project. npm i -g react-native-git-upgrade && react-native-git-upgrade
  2. Open Xcode -> File -> Project settings -> Advanced.
  3. Select "_Custom_", then select "_Relative to Workspace_" and then click done, done.
  4. Update your CLI. npm i -g react-native-cli
  5. Update your Nodejs 8 and NPM. nvm install --lts and nvm install-latest-npm
  6. Remove ios/build and node_modules (in your project root path)
  7. Proceed again with npm install and react-native run-ios, and give me a hug :-)

It finally works here.

  • Mac OS High Sierra 10.13.4
  • Xcode 9.3
  • NPM 5.8.0
  • Node 8.11.1
  • RN 0.55.2
  • Removing ios/ and android/ folders
  • yarn install
  • react-native eject

Solved my problem!

still issue with CfBundleIdentifier

Print: Entry, ":CFBundleIdentifier", Does Not Exist

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] ios: react-native run-ios
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] ios script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I had this problem in my VSC console and I did:
Go to File -> Project settings
Click the Advanced button
Select "Custom" and select "Relative to Workspace" in the pull down
click done, done
But error still was the same.
So I opened Xcode and tried to compile, I received an error with react-native-maps. I clicked auto fix and it resolves issue.

I hope it helps somebody :)

Switch from React Native to Swift xD

just follow this link 👍

https://stackoverflow.com/questions/37461703/print-entry-cfbundleidentifier-does-not-exist

delete your ios/build folder and open Xcode and change build path after this, build again.

I hope help someone and avoid spend 2 hour trying to solve this

Running react-native upgrade fixed the issue for me.

What worked for me was going into my React-Native project directory (main directory) and deleting the ios directory. Then in terminal type react-native eject, which will then generate another ios folder. After that, it instantly worked for me. It's important to note that if you have anything important in the ios directory to save it, but anything that's automatically generated by ejecting will be recreated and in a way that actually works. I guess this method doesn't work for people using Expo, as ejecting means you can no longer use it. I did not have to delete android folder, but you can do that too as ejecting will generate bother ios and android folders (if and only if they are missing)

Running react-native upgrade and resetting all the file fixed it for me. I then used the git to put back all the changes that were needed and it was good to go :) Thanks to @consideRatio for the answer

Updating react using react-native upgrade worked for me

It because of the react version. If you upgrade react too, then it will work without problem.

I fixed this by editing node_modules/react-native/local-cli/runIOS/runIOS.js to change the value returned by getBuildPath to Build/Products/${configuration}-${device}/${appName}.app (removing the initial build/

this reverts the fix in #18700

here's my setup:

Environment:
  OS: macOS High Sierra 10.13.4
  Node: 8.11.1
  Yarn: 1.6.0
  npm: 5.6.0
  Watchman: 4.7.0
  Xcode: Xcode 9.3 Build version 9E145
  Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
  react: 16.3.2 => 16.3.2
  react-native: 0.55.3 => 0.55.3

Just to follow this one up, after discussing with the author of the fix in #18700, you need to make sure that the build location in Xcode preferences is set to "unique" (I had it set to something else, which broke things for me):

39661487-0680544e-5074-11e8-8c39-a30907e259eb

You then must set the build location in project settings to "Xcode default":

screen shot 2018-05-05 at 15 09 21

That fixed it for me, with the environment shown in the previous comment (React-Native 0.55.3, Xcode 9.3). No other jiggery-pokery was required; no deleting directories or running upgrade commands or anything else. Hope this helps somebody else.

Created a NEW project.

  • Did rm -rf node_modules and rm -rf ios/build.
  • Done with changing paths like @kranzky said.
  • Done doing all crazy Project Settings n stuff on Xcode
  • Done with all the react-native upgrade and some react native git upgrade kinda thing as well, which react-native officially tells you to use.
  • Done with everything SO & GH issues asked me to do.
  • Now, not sure what else to do!

Still fails with the same error.

Tried everything! I never want to give up, but, this is so funny! Everyone comments IT WORKS. And nothing works for me :D #GLHF

react: 16.3.1
react-native-cli: 2.0.1
react-native: 0.55.3

None of the above fixed it for me. I had to do the following:

  • Update operating system
  • Update XCode
  • Uninstall and reinstall homebrew
  • Uninstall and reinstall nvm
  • Get the latest version of node
  • Uninstall and reinstall yarn
  • Uninstall and reinstall react-native-cli

  • One or more of those updates ended up fixing the bug.

I have the same problem. The app does not work after execute npm run eject

react-native info
Scanning folders for symlinks in /Users/ksquarelabs/dev/courses/ghost/node_modules (14ms)

Environment:
  OS: macOS High Sierra 10.13.4
  Node: 6.9.1
  Yarn: 0.22.0
  npm: 3.10.8
  Watchman: Not Found
  Xcode: Xcode 9.3.1 Build version 9E501
  Android Studio: 2.3 AI-162.3764568

Packages: (wanted => installed)
  react: 16.3.1 => 16.3.1
  react-native: ~0.55.2 => 0.55.4

So, I have the same problem and It works by issuing the command below:

cd ./ios/build
mkdir Build
cd Build

then, I symlink the folders:
ln -s ../Products .
ln -s ../Intermediates

and last react-native run-ios to work again
have a nice day :)

I had the same issue, in my case the length of fabric node_module dir was too long, so I pulled the repo in the root (~) dir and run it again and everything was OK :) I hope it helps you.

Does anyone know the cause? I get this when I try to run the app in a custom directory e.g. react-native run-ios --project-path="../"

Was this page helpful?
0 / 5 - 0 ratings