139

When I run react-native run-ios the build succeeds but I get the error below. I've checked all over the place but nothing seems to be working. Using sudo in front of the command does not help either. I am using Xcode 7.3, react-native-cli: 0.2.0, react-native: 0.24.1, node v5.11.0.

=== BUILD TARGET mobileTests OF PROJECT mobile WITH CONFIGURATION Release ===

Check dependencies

** BUILD SUCCEEDED **

Installing build/Build/Products/Debug-iphonesimulator/mobile.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/astiefel/workspace/bosspayments/mobile/node_modules/promise/lib/done.js:10
      throw err;
      ^

Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/mobile.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/astiefel/workspace/bosspayments/mobile/node_modules/promise/lib/core.js:45:5)
    at doResolve (/Users/astiefel/workspace/bosspayments/mobile/node_modules/promise/lib/core.js:200:13)
    at new Promise (/Users/astiefel/workspace/bosspayments/mobile/node_modules/promise/lib/core.js:66:3)
    at Array.runIOS (runIOS.js:23:10)
    at Object.run (/Users/astiefel/workspace/bosspayments/mobile/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)
6
  • And does the bundle identifier exist in the file? I assume not, so the question is "why isn't it being written to the file".
    – trojanfoe
    May 26, 2016 at 13:06
  • For me it's due react-native compatibility issue with Xcode9.4. I resolved using the following steps. "rm -rf node_modules" then "react-native upgrade" then "npm install" then "react-native run-ios"
    – raja
    Jul 18, 2018 at 10:03
  • Raja..are you sure it's possible to run react-native upgrade after you've removed the node_modules folder? I tried and it said upgrade wasn't recognized
    – VK1
    Sep 6, 2018 at 6:46
  • Just close your terminal, open it again and run the app it worked for me.
    – Chandni
    Oct 18, 2018 at 12:42
  • What an absolute nightmare... perhaps if there are 36 different answers to this question, spanning form 2016 to 2019, something should be done to address the underlying issue? Feb 15, 2019 at 22:49

45 Answers 45

117

Open Project in Xcode

If Xcode > 9 run command react-native upgrade (this overwrites all your iOS configurations, use with caution!)

then

1.Go to File -> Project settings

2.Click the Advanced button

3.Select "Custom" and select "Relative to Workspace" in the pull down

4.Change "Build/Products" to "build/Build/Products" and "Build/Intermediates" to "build/Build/Intermediates"

Add package

5.click done, done

10
  • 1
    This worked for me on xcode 8.2, fixed my problem thanks!
    – KrakenDev
    Feb 17, 2017 at 19:37
  • @SurajShingade I have Xcode 9.4 on my machine and can't find the "Project Settings" option within "Files". I only see "Workspace Settings...". Do you know where to access Project Settings? - imgur.com/a/SqAemnL - holding down the option key with File menu open doesn't show it either Aug 27, 2018 at 15:10
  • 2
    @PatNeedham "Project Settings" was renamed to "Workspace Settings"
    – Toby Caulk
    Sep 2, 2018 at 1:14
  • 3
    Can you please explain a little why this solution works ?
    – Victor
    Sep 4, 2018 at 17:55
  • 3
    This is still the way to fix it as of xCode 10
    – jacurtis
    Oct 6, 2018 at 23:52
70

This is may occurs if you are missing config.h file,

For update config.h file,

1) Close your Xcode.

2) Open Terminal, go to your project's root folder and do:

cd node_modules/react-native/third-party/glog-{X}.{X}.{X}/

3) Run the configure script:

./configure

4) Open Xcode and try to run your app.

{X}: version number glog

4
  • 6
    I installed react-native from scratch, created my first project, but couldn't get that to work. This answer fixed my problem. I wonder why this happens, since it's a fresh and new installation
    – Antonio
    Oct 18, 2018 at 9:05
  • This worked for me. Fresh install of react-native 0.55, Xcode version 10
    – mat
    Dec 3, 2018 at 2:49
  • 2
    ... what if there is no configure script, as in 0.58? Feb 15, 2019 at 22:53
  • Get the error : checking whether we are cross compiling... configure: error: in /Users/macbookpro2018/sites/calendar/node_modules/react-native/third-party/glog-0.3.5 configure: error: cannot run C compiled programs.
    – Bomber
    May 3, 2019 at 10:04
36

If you're using Xcode 10, it may be due to an incompatibility with the latest build system of Xcode. Try switching to the legacy build system.

Open Xcode 10, File > Project Settings > Build System > switch dropdown to Legacy Build System.

Screenshot

2
  • rats! I've lost two workdays to this issue. What's crazy is my CLI build worked just fine until 3 days ago. No idea wtf happened. This didn't fix the problem either. Wanna see a grown my cry? TT
    – Mike S.
    Feb 23, 2020 at 17:12
  • 3
    Perfect, but it's saying legacy mode is deprecated. Is it problem?
    – Kvlknctk
    Feb 15, 2021 at 13:13
28

Update React using react-native upgrade did it for me.

Disclaimer: this overwrites all your iOS configurations, use with caution!

4
  • 30
    overwriting all iOS files will overwrite any configurations you have made to your project. lol. use at your own risk disclaimer is the least you could do.
    – AlxVallejo
    Jun 29, 2017 at 16:09
  • 2
    Would be helpful if someone could explain what "all your iOS configurations" means. Feb 27, 2019 at 21:41
  • 2
    @AndrewKoster it means that if you change a file in the iOS directory, it'll be overwritten. Let's say you changed at Xcode the configurations for your project, e.g: adding the descriptions to when you prompt the user for permission. All these custom changes made there would be overwritten. Sep 20, 2020 at 4:55
  • 3
    Does anyone know which files react-native upgrade might modify? Are these files part of the project? Under version control, or ignored by default? Or are they part of the OS, outside of version control? It's all very vague. Sep 20, 2020 at 21:55
21

I faced the same problem with iOS 14 and Xcode 12.

Error: Command failed: ...../Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

I solved it by removing my yarn.lock file and node_modules folder. Then install everything again with yarn install. The logic behind it is that this will upgrade your react-native-cli which fixes this error.

2
  • 3
    Removing the lock file (in my case package-lock.json because I'm not using yarn) helped a ton. Worked for me. Oct 27, 2020 at 16:00
  • 1
    Faced the issue when running react-native run-ios --scheme XXX. Apparently react-native-cli needed to be updated to fix it. Removing yarn.lock did the trick! Oct 31, 2020 at 15:48
14

My problem was actually that my build was in Release mode instead of Debug mode. As a result, the identifier was pointing to something that was not in existence. I changed the build type and it ended up working.

4
11

For [email protected] the following did the trick for me:

1) Check your paths, open your .xcodeproj (not .xcworkspace) file and:

  • go to File > Project Settings > Advanced

  • custom > Relative to workspace

  • set the products path to 'build/Build/Products'
  • set the intermediates path to 'build/Build/Intermediates'
  • press done and save your changes

2) Run rm -rf ios/build in your project's root directory

3) Close your react packager

4) Run react-native run-ios again

3
  • Also works on : "react": "16.2.0", "react-native": "0.52.0", Mar 19, 2018 at 13:55
  • This solved issue for me after adding dependencies via Pods to the iOS part of our RN project. Except: I made this change in the .xcworkspace config.
    – cayleyh
    Sep 20, 2018 at 18:59
  • @cayleyh, this did not for me exactly but it did remove the Splashscreen error, so are you saying you followed Tims step except you did it inside of xcworkspace?
    – Daniel
    May 30, 2019 at 20:37
10

I also came across this issue as well and I found a way to fix it

Here is what i did:

1) Make sure there is no white spaces in the file directory.

2) cd project directory

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.

1
  • 25
    not worked for me still i have this error :Entry, ":CFBundleIdentifier", Does Not Exist
    – Mehrnoosh
    Mar 22, 2018 at 12:07
10

The Print: Entry, ":CFBundleIdentifier", Does Not Exist message just indicates your project failed to compile or link. You'll need to go back through your output in order to find a hint about the actual root cause.

If you're having problems, look at the full build output, not just the last few lines. You may want to open the project in Xcode and hit ⌘B to build it. The build errors in Xcode should help you find the root cause of the failure.

2
  • Life savior. It was another issue indeed. Had my Schema renamed and the problem was solved. Mar 7, 2019 at 13:15
  • In my Xcode comiling and I can able to build. While running the react-native run-ios command it failed
    – sejn
    Dec 4, 2019 at 7:34
9

I had this happen to me when my node_modules folder got screwy after installing a new package. I killed the folder rm -rf node_modules and then did an npm install to re-install my packages and that fixed it.

0
6

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.

0
3

For me it was a problem with accidently setting up modules using Cocoapods & react-native link at the same time.

Don't mix those two for same modules!

2
  • So how to go around with this?
    – Isaac
    Dec 21, 2018 at 8:26
  • @Isaac nuke cache and install with either cocoapods / react-native link, depending on how is your project set up Dec 22, 2018 at 14:15
3

I fixed this by deleting /build/ and running react-native run-ios again

1
  • @EranOr do you see Provide a valid path to the desired application bundle. in your console? Try the following xcode settings file => project settings, build system: legacy, derived data: project-relative, DerivedData in the input => advanced, custom, relative to workspace, build/Build/ in the first 2 inputs
    – user3196599
    Dec 22, 2018 at 3:31
3

I'v tried all of these solutions but the one that has worked for me is:

  1. run react-native upgrade
  2. open xcode
  3. run the application in xCode
  4. works fine!
2
  • thanks Eli, i have solved this issue by simply running "react-native upgrade" Mar 27, 2019 at 11:33
  • For those who work in enterprise environments, I would urge caution using this solution. Upgrading the react-native core needs to be planned because it could negatively impact the work of others. Ask first.
    – Mike S.
    Feb 23, 2020 at 18:10
2

Have you checked that you declared a bundle identifier? You can do this by Clicking on your project file in xcode and then selecting the general tab and it is listed under the first text box under "Identity". Another way to check is to check in your info.plist file in the ios folder of your project. This is how it shows in my info.plist. My actual bundle identifier for my project is in xcode.

<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
0
2

You can follow below steps to resolve this error:

Step 1

Open terminal

Step 2

cd node_modules/react-native/third-party

Step 3

ls

Copy or identify glog-{version}

Step 4

cd ../../../

Step 5

cd node_modules/react-native/third-party/glog-{version}

Step 6

./configure

I hope this will work !!!

1

I updated Xcode to v8 and the error was resolved.

1

the 0.44 is ok to run,but 0.45 can not,maybe is the version problem i solved this by the following command: rninit init TaxiApp --source [email protected];

1

I found how to solve the issue: do NOT use space in your project path! 🎉 😄

1

My terminal pops out the same message due to deleting some simulators I don't use in Xcode.

If you run react-native run-ios with no specific parameters, react-native will run the default simulator which is iPhone 6 with iOS 10.3.1 in my case and I deleted this simulator by chance.

Here comes my error messages:

xcodebuild: error: Unable to find a destination matching the provided destination specifier:
        { id:F3A7BF54-B827-4517-A30D-8B3241C8EBF8 }

Available destinations for the "albums" scheme:
    { platform:iOS Simulator, id:CD64F26B-045A-4E27-B05A-5255924095FB, OS:10.3.1, name:iPad Pro (9.7 inch) }
    { platform:iOS Simulator, id:8FC41950-9E60-4264-B8B6-20E62FAB3BD0, OS:10.3.1, name:iPad Pro (10.5-inch) }
    { platform:iOS Simulator, id:991C8B5F-49E2-4BB7-BBB6-2F5D1776F8D2, OS:10.3.1, name:iPad Pro (12.9 inch) }
    { platform:iOS Simulator, id:B9A80D04-E43F-43E3-9CA5-21137F7C673D, OS:10.3.1, name:iPhone 7 }
    { platform:iOS Simulator, id:58F6514E-185B-4B12-9336-B8A1D4E901F8, OS:10.3.1, name:iPhone 7 Plus }

. . .

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

In order to get rid of these, open up your Xcode and check for available simulators (as same as terminal listed) and run react-native run-ios --simulator="your device name"

For my case, I run react-native run-ios --simulator="iPhone 7", the problem solved.

0
1

After a couple of months trying all the answers, I finally update my OS to Sierra, Update XCode to the latest version and with that all the errors disappear. Hope this could help some folks out there!

1

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
1

Using this version is work for me with xcode 10.1

"react": "16.6.0-alpha.8af6728",
"react-native": "0.57.4"
0
1

All these solution suggests have not worked for me. I have just create a rn 0.58.5 project. And compared with my project. I saw there is no JavaScriptCore.framework under the Build Phasess > Link Binary With Libraries. After drag and drop JavaScriptCore react-native run-ios build succeeded.

JavaScriptCore.framework location: ‎⁨Macintosh HD⁩ ▸ ⁨Applications⁩ ▸ ⁨Xcode⁩ ▸ ⁨Contents⁩ ▸ ⁨Developer⁩ ▸ ⁨Platforms⁩ ▸ ⁨iPhoneOS.platform⁩ ▸ ⁨Developer⁩ ▸ ⁨SDKs⁩ ▸ ⁨iPhoneOS.sdk⁩ ▸ ⁨System⁩ ▸ ⁨Library⁩ ▸ ⁨Frameworks⁩

JavaScriptCore.framework

0
1

For me It was ios dependencies managed by cocoapods.

Had to do this:

$ cd ToProject/ios

$ pod install

$ react-native run-ios

This worked for me

https://shift.infinite.red/beginner-s-guide-to-using-cocoapods-with-react-native-46cb4d372995

PS: Was trying to figure out work done by somebody else

2
  • running pod install said : [!] No `Podfile' found in the project directory. Mar 24, 2019 at 10:44
  • @MohammadMirzaeyan assumption was you have done pod init and you have valid Podfile. Please do not downvote If you have don't have enough knowledge to counter your claims. Since It was somebody else's project as I mentioned I already had the PodFile. I have removed pod setup completely for folks like you.
    – user710907
    Mar 27, 2019 at 11:41
1

The error message similar to The domain/default pair of (../ios/Runner/Info, CFBundleIdentifier) does not exist

Means Xcode think you plist have invalid format content.

You need to past out the content of Info.plist file to find out what's wrong with that file.

One possible problem is that this <key>s and <values>s (<array>s, <string>s, or <bool>s ) are not paired correct. For example:

<key>UISupportedInterfaceOrientations</key>         //<------ here is the key
<key>NSPhotoLibraryUsageDescription</key>
<key>NSCameraUsageDescription</key>
<string>Tagueo necesita usar la camara</string>
<key>NSMicrophoneUsageDescription</key>
<string>Tagueo necesita usar el microfono</string>
<array>                                            //<------ here is the value
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>   //<------ please compare this key
<array>                                            //<------ please compare this value
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationPortraitUpsideDown</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
</array>

You only need to move the key and value togather

<key>UISupportedInterfaceOrientations</key>        //<------ here is the key
<array>                                            //<------ follow with the value
   <string>UIInterfaceOrientationPortrait</string>
   <string>UIInterfaceOrientationLandscapeLeft</string>
   <string>UIInterfaceOrientationLandscapeRight</string>
</array>
0
1

I know it's an old issue, but if any questions here haven't solved your problem. I solved mine after reading this answer about another question. Let me explain:

I just had the same issue, and in my case, the Info.plist wasn't possible to be found, that's why my Product Name in Build Settings was wrong. I don't know why the name has changed sometime before.

error Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier /Users/joaolavoier/Library/Developer/Xcode/DerivedData/WalletApp-dkxuxrpnrdamwmchtgsxasmjabmt/Build/Products/Debug-iphonesimulator/WalletApp.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
. Run CLI with --verbose flag for more details.
Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier /Users/joaolavoier/Library/Developer/Xcode/DerivedData/WalletApp-dkxuxrpnrdamwmchtgsxasmjabmt/Build/Products/Debug-iphonesimulator/WalletApp.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

    at checkExecSyncError (child_process.js:616:11)
    at Object.execFileSync (child_process.js:634:15)
    at runOnSimulator (/Users/joaolavoier/Workspace/wallet-app/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:191:45)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Command.handleAction (/Users/joaolavoier/Workspace/wallet-app/node_modules/@react-native-community/cli/build/index.js:186:9)
error Command failed with exit code 1. 

As you can see, it is looking for the Info.plist in /Users/joaolavoier/Library/Developer/Xcode/DerivedData/WalletApp-dkxuxrpnrdamwmchtgsxasmjabmt/Build/Products/Debug-iphonesimulator/WalletApp.app/Info.plist

But the WalletApp.app folder didn't exist.

Step to fix this:

    1. Go to Target > WalletApp > Build Settings tab
    1. Scroll to Packaging > Product Name
    1. Changed the Product Name to WalletApp.
    1. Removed the build folder rm -rf /Users/joaolavoier/Library/Developer/Xcode/DerivedData/WalletApp-dkxuxrpnrdamwmchtgsxasmjabmt
    1. Clean Product > Clean Build Folder
    1. Build Product > Build
    1. At last in the root of your project yarn start and yarn ios.

I hope, it can help someone.

1
  • this seemed to be the issue with me too.
    – user8212309
    Feb 25, 2021 at 21:07
0

This work for me Click on the RCTWebSocket project in your navigator and remove the flags under build settings > custom compiler flags enter image description here

0

This worked for me. Follow steps https://facebook.github.io/react-native/docs/getting-started.html (Building Projects with Native Code).

Before running react-native run-ios command, download boost node module from https://sourceforge.net/projects/boost/files/boost/1.63.0/ and replace node_modules/react-native/third-party/boost_1_63_0

Now run react-native run-ios command

0
0

For me it's due react-native compatibility issue with Xcode9.4. I resolved using the following steps. on my project /ROOT

  1. rm -rf node_modules
  2. react-native upgrade
  3. npm install
  4. react-native run-ios

SOLVES the issue, this thread helped me to understand the issue.

Not the answer you're looking for? Browse other questions tagged or ask your own question.