[ios] Print: Entry, ":CFBundleIdentifier", Does Not Exist

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)

This question is related to ios reactjs react-native

The answer is


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>

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 !!!


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.


Just open the project in xcode app and it will automatically do all the imports and resolve issues. Worked for me, Xcode 10+

Edit 1: Open the iOS folder of your app not your global folder.


In my case, I pull project from git and it also includes the ios folder.

First i remove ios folder rm -rf ios then, react-native upgrade


I also get same error while running project react-native run-ios

But when i run project from xcode, that is work for me.


FIX FOR OSX EL CAPITAN

I'm still on OSX 10.11.6 with XCode 8.2.1 ... will upgrade someday but not today. I was able to get past the :CFBundleIdentifier error by downgrading react native to 52.0

yarn upgrade [email protected]

Got me a successful build on the simulator. Cheers!


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.


When you run npm install command some time internet issue problem, Files in node_modules\react-native\third-party is not properly downloaded so please check this is properly downloaded or not if no please remove node_modules and install it again

then run react-native run-ios command


First run your project from Xcode then try to run from command line. That was the issue for me.


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


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

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


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 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.


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>

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


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.


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


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


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];


The basic reason is deploying port is not free. Either you restart the device and get all ports free else run $ lsof -i :8081 and find the process which occupied port 8081. Kill the process which is using port 8081 by running $ kill -9 {process_which_is_running_under_8081}


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


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.


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!


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.


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


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!

Adding one to the list of possible causes: xcodebuild could be corrupted.

In my case xcodebuild didn't do anything, so it never generated the ios/build/ directory, and the above error resulted.

I used 'which xcodebuild' on the command line, deleted it, and the error was gone

Just took me a while to realize that xcodebuild was bad - I looked at log messages and manually ran the xcodebuild command with the react native parameters - no output of any kind. No build messages, no error messages, nothing. Ran with no params - same....

Leaving this here as one more thing to check if this error message appears. Is your xcodebuild working?


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.


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


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!


Unfortunately, none of the mentioned solutions worked for me.

After trying out some of the answers from this issue, the following finally did work:

As one or more of the required iOS third-party libraries were not properly downloaded to ~/.rncache (meaning the files in there were corrupted and could not be unzipped), I removed the content of this folder, ran react-native run-ios again, and this eventually did the trick.


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


Delete the node modules and run 'npm install' in your project directory. Now you can able to run the project.


I got this error when I ran react-native run-ios --scheme="customscheme" and the name of customscheme was misspelled.


I updated Xcode to v8 and the error was resolved.


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

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


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


Using this version is work for me with xcode 10.1

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

Try to look into previous error message happened before current error i.e., "CFBundleIdentifier”, Does Not Exist.

Fix previous error then this error should disappear.

I fixed previous duplicate symbols for architecture error when run react-native run-ios --simulator="iPad Pro (9.7-inch), then the problem gone.


I am on XCode 10 with RN version 0.5.7, I tried almost all solutions and nothing worked.

After loosing a lot of time, finally the way I got it to working by doing the following

  1. Install previous version of react-native by running react-native init project --version [email protected]
  2. Open project/ios/project.xcodeproj and select Debug for command line builds
  3. Make sure to select the correct development certificate
  4. Run react-native run-ios once again, this time it must work.

Examples related to ios

Adding a UISegmentedControl to UITableView Crop image to specified size and picture location Undefined Symbols error when integrating Apptentive iOS SDK via Cocoapods Keep placeholder text in UITextField on input in IOS Accessing AppDelegate from framework? Autoresize View When SubViews are Added Warp \ bend effect on a UIView? Speech input for visually impaired users without the need to tap the screen make UITableViewCell selectable only while editing Xcode 12, building for iOS Simulator, but linking in object file built for iOS, for architecture arm64

Examples related to reactjs

Error: Node Sass version 5.0.0 is incompatible with ^4.0.0 TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined raised when starting react app Template not provided using create-react-app How to resolve the error on 'react-native start' Element implicitly has an 'any' type because expression of type 'string' can't be used to index Invalid hook call. Hooks can only be called inside of the body of a function component How to style components using makeStyles and still have lifecycle methods in Material UI? React Hook "useState" is called in function "app" which is neither a React function component or a custom React Hook function How to fix missing dependency warning when using useEffect React Hook? Unable to load script.Make sure you are either running a Metro server or that your bundle 'index.android.bundle' is packaged correctly for release

Examples related to react-native

How to resolve the error on 'react-native start' React Native Error: ENOSPC: System limit for number of file watchers reached How to update core-js to core-js@3 dependency? Unable to load script.Make sure you are either running a Metro server or that your bundle 'index.android.bundle' is packaged correctly for release error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65 How can I force component to re-render with hooks in React? What is useState() in React? Getting all documents from one collection in Firestore ReactJS: Maximum update depth exceeded error React Native: JAVA_HOME is not set and no 'java' command could be found in your PATH