React-native: Entry, ":CFBundleIdentifier", Does Not Exist

Created on 18 Sep 2020  路  15Comments  路  Source: facebook/react-native

Please provide all the information requested. Issues that do not follow this format are likely to stall.

Description

Since XCode 12 Automatically installed, I have been unable to run my App in the iOS simulator. I run into the following error...

React Native version:

System:
OS: macOS 10.15.6
CPU: (4) x64 Intel(R) Core(TM) i7-6567U CPU @ 3.30GHz
Memory: 3.83 GB / 16.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.9.1 - ~/emsdk/node/12.9.1_64bit/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.10.2 - ~/emsdk/node/12.9.1_64bit/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.0, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 12.0/12A7209 - /usr/bin/xcodebuild
Languages:
Java: 10.0.2 - /usr/bin/javac
Python: 3.7.4 - /Users/michaelgecawicz/opt/anaconda3/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.11.0 => 16.11.0
react-native: 0.62.2 => 0.62.2
npmGlobalPackages:
react-native: Not Found

Steps To Reproduce

  1. npx react-native run-ios

Expected Results

The app builds and runs in the iOS Simulator

Snack, code example, screenshot, or link to a repository:

Screen Shot 2020-09-18 at 10 58 56 AM

In Xcode...
Screen Shot 2020-09-18 at 12 07 23 PM

Needs 馃摝Bundler

Most helpful comment

Make sure the latest version of @react-native-community/cli is installed by these instructions: https://github.com/react-native-community/cli#updating-the-cli.

All 15 comments

Im having the same problem after updating Xcode to 12.0

Same problem here as of Xcode 12. Check if the .app file created in DerivedData is the same file it is attempting to install to the simulator. In my case, it is not. It is looking for a file name that does not exist so it fails. It does work fine when running in Xcode. I only see the issue with npx react-native run-ios.

As a workaround, you can change the package name in Xcode for your project (target > Build Settings > Packaging > Product Name). Change it to whatever the .app filename is (ie if the file name is AwesomeProject.app, set Product Name to AwesomeProject). However, then the app won't build in Xcode. Perhaps someone else can chime in with a more robust workaround.

At one point I renamed my project, and it is using that old name as the .app file name in DerivedData. Before Xcode 12 it would create that file using my new project name and would work.

Same here after upgrading to Xcode 12
Through xcode it works normally, but if you run the command npx react-native run-ios this error happens

I'm here in name of @santinucera and we are having the same problem, everything ok when running through xcode but no luck from the command line. I have already tested @joebernard solution but didn't solve the problem in my case.

@rfahernandez Try deleting the contents of DerivedData and run Clean Build Folder after changing Product Name.

@joebernard I have tried that and it still doesn't work. I will try some other solutions and post an update in case of success. Thanks for your help!

I'm here in name of @santinucera and we are having the same problem, everything ok when running through xcode but no luck from the command line. I have already tested @joebernard solution but didn't solve the problem in my case.

I did try to run it in Xcode. However, I get hit with the following error:
in /Users/me/project/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a(cryptlib.o), building for iOS Simulator, but linking in object file built for iOS, file '/Users/me/project/ios/Pods/OpenSSL-Universal/ios/lib/libcrypto.a' for architecture arm64

Any Ideas why this might be happening?

I'm having the same problem. If I run the app in Xcode it works fine.

Make sure the latest version of @react-native-community/cli is installed by these instructions: https://github.com/react-native-community/cli#updating-the-cli.

@SConaway This worked for me! Unfortunately, I have run into another problem where my images (from uri) are not loading. Strange.

@mgecawicz What iOS version? iOS 14 requires a react-native upgrade to display images properly

@SConaway Im not sure how do do that. I keep getting an error with git...
error Command failed: git status -s fatal: not a git repository (or any of the parent directories): .git

@mgecawicz what command are you running? Make sure you read the yellow note here: https://reactnative.dev/docs/upgrading.

@SConaway Thank you for the help! This worked for me.

for me it only works by changing it to legacy build, I'm use react-native 0.61.5

Was this page helpful?
0 / 5 - 0 ratings