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

Created on 6 Mar 2017  Â·  29Comments  Â·  Source: facebook/react-native

We use GitHub Issues for bugs.

If you have a non-bug question, ask on Stack Overflow: http://stackoverflow.com/questions/tagged/react-native

If you have a feature request, post it on Product Pains: https://productpains.com/product/react-native/

--- Please use this template, and delete everything above this line before submitting your issue ---

Description

react-native run-ios
then:

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

Additional Information

Version: react-native 0.42.0
trouble in iOS, android works fine
OS: MacOS 10.12.3

Locked

Most helpful comment

Experiencing the same issue on 0.42.0

All 29 comments

Experiencing the same issue on 0.42.0

Hi @alekseylovchikov!

Can you please check if your Info.plist is located at this path: build/Build/Products/Debug-iphonesimulator/pizza.app/Info.plist and have no syntax errors?

@Kureev I just checked and my Info.plist doesn't have any errors at this path.. the Info.plist isn't in /.app though - It's just in /Debug-iphonesimulator/

I'm not the expert here, but I think it should be in the .app. Any ideas how it may happen?

Probably @grabbou can give you more insightful feedback on it

@alekseylovchikov same issue, check your xcode version, if it's 7.2.1, you should update to xcode8.
For me it works.

@mrbone xcode version 8.2.1

same issue happening here.

macOS 10.12.3
react-native: 0.42.0
react-native-cli: 2.0.1

I'm having the same issue

macOS 10.12.3
react-native: 0.42.0
react-native-cli: 2.0.1

Same issue:

macOS Sierra 10.12.3
react-native-cli: 2.0.1
react-native: 0.36.1

same...
osx 10.12.3
xcode 8.2.1
react 042

What do you have in "Bundle Identifier" here
image
and here?
image

com.myexample.myname
and
$(PRODUCT_BUNDLE_IDENTIFIER)

I have the same problem when I try to run my app using react-native (react-native run-ios --configuration Stage). I use a custom configuration for my Xcode project: Stage (except basic Debug and Release) and after the error I have a directory /ios/build/Build/Products/Stage-iphonesimulator with one subdirectory MyApp.app, but this directory is empty.

The Debug and Release configurations work correctly.
And also I can correctly build my Stage configuration using Xcode.

in my case I got this error from having the xcworkspace file saved in the folder ios and it stopped from using command react-native run-ios. I have this xcworkspace because it is required to have that from using fastlane to run another CI.

react-native run-ios
Scanning 804 folders for symlinks in /Volumes/RAMDISK/reactnative/gl/node_modules (107ms)
Found Xcode workspace onlyfastlane.xcworkspace
Launching iPhone 6 (iOS 10.2)...
Building using "xcodebuild -workspace onlyfastlane.xcworkspace -configuration Debug -scheme onlyfastlane -destination id=21C21FEE-A13E-43F3-9C61-E4EFFC98A46E -derivedDataPath build"
User defaults from command line:
    IDEDerivedDataPathOverride = /Volumes/RAMDISK/reactnative/gl/ios/build


xcodebuild: error: The workspace named "onlyfastlane" does not contain a scheme named "onlyfastlane". The "-list" option can be used to find the names of the schemes in the workspace.

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

RN 0.42.3
XCode 8.2
Once I removed the workspace file and everything run as normal. Please fix that

same issue happening here.

macOS Sierra: 10.12.3
react-native: 0.43.3
react-native-cli: 2.0.1

Please, help!!!!! :)

I was looking around for any solution and found this thread. Maybe https://github.com/facebook/react-native/issues/7308#issuecomment-219597774 can help you solving this issue.

I propose to keep all discussions about :CFBundleIdentifier errors in one thread. Therefore, closing this issue in favor of https://github.com/facebook/react-native/issues/7308

I see the same problem as @alekseylovchikov. The error that is reported is that CpResource main.jsbundle failed to copy to the correct location. I have looked through every comment on issue #7308 and found nothing helpful since no one mentions that they had a problem with main.jsbundle. I tried running react-native run-ios --configuration Release but that fails too.

Building in Xcode also produces the same error.

Interestingly / annoyingly is that my coworker can build with no issues.

macOS Sierra: 10.12.3
react-native: 0.42.0
react-native-cli: 2.0.1

So, I borrowed a laptop from a friend and I get the same error as above. Just to reiterate, it has nothing to do with :CFBundleIdentifier the error occurs before that but it causes the build error when it tries to read the Info.plist in the build directory but of course it doesn't exist.

react-native upgrade , get rid of your old ios files by letting it rewrite the pod files etc and you are golden.

how to get rid of old ios files?

On Monday, May 22, 2017, George notifications@github.com wrote:

react-native upgrade , get rid of your old ios files by letting it
rewrite the pod files etc and you are golden.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.<
https://ci4.googleusercontent.com/proxy/ut9hJhU3jfu2KIEJrj6WzUr93hBZ6OF7beiCjV-piXSrw8X0x20Mjab-JS_bXFNtjLrQFEuSoix-RkUK5_h-S1ZhO3bV10L8_t7PwlPpq2nBtjcNhZynf_kAYyIm-DOprq_rJz5qtoZQN1z6oXWkKweec8iz9g=s0-d-e1-ft#https://github.com/notifications/beacon/AA6xMwboLcClc_uEBkC9UuSRj5UzLgjhks5r8UH-gaJpZM4MT3Tj.gif>

@Umity react-native upgrade command will prompt you asking you if you want to change several files, just let it change them.

thank you George.. will try when home

On Monday, May 22, 2017, George notifications@github.com wrote:

@Umity react-native upgrade command will prompt you asking you if you
want to change several files, just let it change them.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.<
https://ci3.googleusercontent.com/proxy/Jw4iN559fazhI7E1oDSPY0wu882nrigdja5wqbbJTjc_I5JPvj-obCbECh_gVcUQ89KRP5z6mybkI6voBRKpUDglsKIePCwMdexcamFc7ELMo-3jZkZWbWYIyQRTlFKyOvj0CGlJ30BxYxxtHYhYNcBLdR59ew=s0-d-e1-ft#https://github.com/notifications/beacon/AA6xMxwaHr3SwbOewjPquZjq0dpvGfpdks5r8Uw4gaJpZM4MT3Tj.gif>

@bz123 That is not wise advice. Any previous custom configuration settings in your XCode project will be wiped clean. Proceed with caution.

"React-native upgrade" command you'll lose a series of configurations. Must redo all by hand.
For me I did

React-native init TestSome (clean install see? but same result)
Install Xcode (latest)
Install it again (same result)
Install Xcode 9 beta 2 (same result)
React-native run-android = OKAY (just to garantee)
react-native run-ios --configuration Release = Noooops
But has * BUILD SUCCEEDED *

** BUILD SUCCEEDED **


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

No positive result ;-; (crying and losing hair)

I have got the same problem, and solved this problem by checking the console log and found this issue may be raised by another issue. the log has some errors: there is something wrong with the third-party:boost_1_63_0, and reports file not found, according this https://github.com/facebook/react-native/issues/14404,I finally solved this problem by replace the boost_1_63_0 with the one I downloaded

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

same issue here, @nimishpatel19 is right, remove space in project path and all went ok

@nimishpatel19 thanks man.... it solved my problem.

Duplicate of #14423

Was this page helpful?
0 / 5 - 0 ratings