react-native: Latest react-native app doesn't work ":CFBundleIdentifier", Does Not Exist
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)
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 148
- Comments: 294 (12 by maintainers)
Links to this issue
Commits related to this issue
- Fixed running the app by switching back to debug mode Release mode wouldn't run on the simulator. took a loooong time to figure that out. https://github.com/facebook/react-native/issues/7308#issueco... — committed to MatthewDailey/selbi-v2 by MatthewDailey 8 years ago
- Feature/migrate prototype to legit (#8) * require input to be filled * enable storing firebase sign-in * publish data input from fields * refactor to enable use of InputScene for non-newList... — committed to MatthewDailey/selbi-v2 by MatthewDailey 8 years ago
- Change irrelevant Products path in ./local-cli/runIOS/runIOS.js https://github.com/facebook/react-native/issues/7308 and many of the same Seems like xcode cli tool isn't create ./build directory any... — committed to blackneck/react-native by blackneck 6 years ago
- Change irrelevant Products path in ./local-cli/runIOS/runIOS.js https://github.com/facebook/react-native/issues/7308 and many of the same Seems like xcode cli tool isn't create ./build directory any... — committed to blackneck/react-native by blackneck 6 years ago
- Change irrelevant Products path in ./local-cli/runIOS/runIOS.js Summary: https://github.com/facebook/react-native/issues/7308 and many of the same Seems like xcode cli tool isn't create ./build dire... — committed to facebook/react-native by blackneck 6 years ago
- Change irrelevant Products path in ./local-cli/runIOS/runIOS.js Summary: https://github.com/facebook/react-native/issues/7308 and many of the same Seems like xcode cli tool isn't create ./build dire... — committed to Plo4ox/react-native by blackneck 6 years ago
Not yet… I finally bought a new mac and solved.
I was able to solve this issue! Looks like port 8081 was in use :
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!
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.I tried all solutions, but nothing works. Great job, react native…
The suggest solution by @consideRatio fixed this problem for me.
When nothing fixes, try on Xcode
As @gvlamadrid said
Finally got this working after reading @dmitrye 's comment. These steps just have a slight twist to @gvlamadrid 's instructions
How I fixed it.
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
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; ^
In my case, BUILD seems to succeed. However, the process terminates with the error message above.
Nothing posted here works for me unfortunately 😦
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:
I still get the same
Entry, ":CFBundleIdentifier", Does Not Exist
error that this ticket mentions. I’ve tried:Any other ideas?
Interestingly enough, everything works if I open the
.xcworkspace
in XCode and run it from there.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. thesudo
or permissions? Also do you haveCFBundleIdentifier
in yourInfo.plist
?nothing work for me…
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 lineI just do
npm install react-native-cli@latest -g
, thenreact-native run-ios
is work!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
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.
Running it with sudo does not solve it for me.
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.
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
npm install react@latest react-native@latest
,it works for me after upgrade xcode 7.x to 8.0.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.
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?
Question: ‘boost/iterator/iterator_adaptor.hpp’ file not found’ and “:CFBundleIdentifier”, Does Not Exist
Reason:
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
All you need to do is 1.run react-native init project 2. cd project 3. npm install 4. react-native run-ios and you should be golden!
Its all about Luck, Some solutions working for someone but not for anyone else, Ridiculous Good Job React native
Need to fix code manually. SecRandomCopyBytes -> (void)SecRandomCopyBytes in RCTSRWebSocket.m then try
react-native run-ios
again, it worked 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
react-native upgrade
Works for me, thanks.after trying almost all solutions posted in this issue, this one is working on mine!
my environments:
唉,已经爬坑太久,收集了很多异常处理情况。累觉不爱呀 ~~~ 其实造成 “:CFBundleIdentifier”, Does Not Exist 的问题很多。请看终极解决办法 https://hacpai.com/article/1497235254333 iOS -> ‘React/RCTBundleURLProvider.h’ file not found
Why was this issue closed? Nothing of the above helps
I resolved this with this comment after trying every solution under the sun.
ios/
orandroid/
react-native eject
<-- this was what did it for mereact-native-git-upgrade
react-native link
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>>>>>>
orHEAD
or>>>>>> HEAD
, fix conflict, save, done.Same issue with react-native 0.48
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
react-native init ProjectName --version 0.44.2
works for me!doing
npm start -- --reset-cache
and thenreact-native run-ios
worked for me.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
Switch from React Native to Swift xD
@dey-dey
@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:
with
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:
So I checked the path and noticed that in the folder:
./ios/build/Build/Products/Debug-iphonesimulator/
I had the appAwesome 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
andI found this:
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:
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.Yeah, I know, not good but I just wanted to run this for now.
Maybe this helps someone figuring out an actual fix.
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
Upgrading react-native => 0.35.0 worked for me.
@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:
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.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.
@trevorwang thank you so much it worked for me
Install react-native updated
npm install -g react-native-git-upgrade
Update react-native
react-native-git-upgrade
Run it with sudo
sudo react-native run-ios
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.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 meThis worked for me, from https://medium.com/@alberto.schiabel/react-native-on-xcode-beta-8-0-how-to-fix-initial-build-error-f0225c649850
: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.
I had this problem.
The real cause is:
react-native upgrade
removesPRODUCT_BUNDLE_IDENTIFIER
fromproject.pbxproj
.Info.plist
, you use$(PRODUCT_BUNDLE_IDENTIFIER)
which becomes empty and will be removed from the compiled app’sInfo.plist
. In the compiled app’sInfo.plist
, there is noCFBundleIdentifier
!!!That’s why it says
":CFBundleIdentifier", Does Not Exist
. It really does not exist.2 solutions:
com.xxx.app
instead ofPRODUCT_BUNDLE_IDENTIFIER
forCFBundleIdentifier
inInfo.plist
PRODUCT_BUNDLE_IDENTIFIER
back intoproject.pbxproj
. It’s something likePRODUCT_BUNDLE_IDENTIFIER = com.xxx.app;
. You can add the bundle id in your app’sBuild Settings
>Product Bundle Identifier
.After commented the
case UIUserInterfaceIdiomCarPlay
directly in Xcode on OSX Yosemite, everything works fine for me.Worked after upgrading dependencies
"react-native": "0.34.0"
Did not fix it for me (I killed ports, changed project settings, etc etc.)
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
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)
@novalagung and Gringox are right.
works for me today: 2017.7.6
i have tried 0.45, 0.46, they got same problem.
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
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/
andandroid/
because I have made changes to each because of custom native integration code. I’ve changed my bundle identifier. I’ve wiped outios/build
. I’ve done areact-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: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 againstbuild/Build/Products
which doesn’t exist. It should just be usingbuild/Products
. I have no idea how to change this dir value.If you have this problem after renaming your application, follow these steps :
Optional :
ios
andandroid
folders.Do :
react-native upgrade
,react-native-git-upgrade
in your project.Actual dependencies
just use Xcode run project/ios/project.xcodeproj and retest react-native run-ios
for me it helped
react-native 0.41.2
[now i got different problem, react-native-maps from airbnb do not work 😦 ]
@stief510 That worked for me! Thanks!
@joshschumacher upgrade worked.
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.
This works to me:
rm -rf ios/build/
Just remove the build folder and build the project again. Then, it works fine.
I noticed that this does not happen when running the packager (
yarn start
) myself vsreact-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 makesreact-native run-ios
safe again..watchmangconfig
to be an empty object:{}
, like the template here.watchman watch-del-all && rm -rf node_modules && yarn install && yarn start -- --reset-cache
(use npm instead of yarn if you’re like that.)react-native run-ios
downgrade react and react-native work for me 😃
Hey guys, I’ve managed to solve this frustrating thing in two steps:
rm -rf ~/.rncache
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!
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.
this blog’s resolution works for me : CFBundleIdentifier", Does Not Exist
I had the error:
I found the issue: do NOT use space in your project path!
What worked for me:
run
npm start
from a terminalThen 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.
None of the solutions above worked for me apart from opening the xcodeproj file in xcode and running the app from there. Frustrating!
This error occurred to me when I changed the
CFBundleDisplayName
to another value thanCFBundleName
. Keeping this two values in sync solved the problem for me.Thanks, dmitrye@!
Here is how I fix it:
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.
@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 theScheme
flyout menu, look at the bottom - you’ll seeEdit
Click that. A modal menu appears. The Build configuration has a select box, make sure its set toDebug
. Fixed it for me.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: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.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 viaHardware -> 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 yourInfo.plist
, it can mess with this stuff.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.
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 answerios/
andandroid/
foldersSolved my problem!
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”
My solution to this is
cd ios && pod install
Then it works fine
Silly enough, but in my case a simple rebooting solved the issue.
whatever the methods we have here,
react-native upgrade
worked for me.I had the same problem and solved it like this.
~
(To exclude white spaces in the path)ProjectName/ios/build
react-native run-ios
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:
I hope that this solutions will help some of us facing this issue.
Hey guys, DO NOT use space in your project path … it solved my problem.
react-native upgrade
work for me.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
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:
FWIW, I didn’t have to change the Project scheme or remove any compiler flags. Here’s my setup:
Hey guys, I might have found a possible solution for this. Worked for me on my 2 Mac computers. I had to:
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!
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.
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.
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.
@stief510 It worked for me. Thanks!
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 ofreact-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 didnpm start -- --port 5000
, and then ran the project in Xcode with ⌘+R@arun0009 Awesome, thanks for posting the answer back here 👍
Running
react-native upgrade
fixed the issue for me.Adding, it works for me, when nothing above fixes:
npm i -g react-native-git-upgrade && react-native-git-upgrade
npm i -g react-native-cli
nvm install --lts
andnvm install-latest-npm
npm install
andreact-native run-ios
, and give me a hug 😃It finally works here.
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.
I had to downgrade allllll the way to v0.52.0. The only version that works for me
Solution:
@malikmani thanks ,this worked for me. but firstly,I created a folder named assets in ios folder
Upgrading node to 8+ solved this for me.
path is wrong in
runIOS.js
, has oneBuild
segment too much Should be: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.
For me Setting the Build Location to unique did the trick, XCode->Preferencec->Location->Advance->Build Location->unique
I upgraded the whole react-native ecosystem with
npm install react-native-git-upgrade
andreact-native-git-upgrade
and finally it worked for me 😃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 was using PODS. I deleted the xcworkspace file and ran ‘pod install’ again. That fixed it for me
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.
I resolved this issue.
The key of this issue is
...build/Build/Products/Debug-iphonesimulator/*.app
. Obviously, therun-ios
command needs the Compiler to export the App tobuild/Build/Products
inDebug
mode.So, you need make sure that:
Build Location is
build/Build/Products
, notXCode Default
, neitherBuild/Products
. You can find this settings in XCode’sFile
>Project Settings
>Advanced
Build Configuration is
Debug
, NOTRelease
You can find this settings in XCode’sProduct
>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.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
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.
react-native init ProjectName --version 0.44.2
worked for me@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.@renguochao’s solution worked for me , Thanks react-native init ProjectName --version 0.44.2
@florismettey your solution saves me man!!! I have tried all of the provided solutions but only this works for me. Thanks so much!
Same problem. use all solution above but not work.wtf.
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=0Solve it! For information:
$(PRODUCT_BUNDLE_IDENTIFIER)
for Bundle Identifier in info.plist (Xcode 8.3)react-native run-ios
with success !restart computer is work for me。 The reason is maybe there is 1 project running.
@brianneisler Your soloution saved my life. Thanks 🙏
I had the same issue. This solved it:
http://stackoverflow.com/questions/26396166/unable-to-run-app-in-simulator
@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.
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:
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.
Fixed in my pull request. Upvote it please.
thanks @stief510 that worked after trying everything else