React Native IOS Build CFBundleIdentifier Does not

2020-03-19 02:57发布

I have create sample React Native project and following the tutorial as per react native website.

I have try to run the application IOS simulator, its throwing error as below ,

 ** BUILD FAILED **


        The following build commands failed:
            PhaseScriptExecution Install\ Third\ Party /Users/Test/Documents/REACTJS/SampleReactNative/ios/build/Build/Intermediates.noindex/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh
        (1 failure)

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

my environment setup information,

  • node version v9.8.0 npm version 5.6.0 react-native-cli: 2.0.1 react-native: 0.54.2 xcode 9.2

Please help us to resolve the issues.

9条回答
叛逆
2楼-- · 2020-03-19 03:45

For XCODE 10.0, I did two things

1) check out this answer which basically says Go to File -> Project settings

Click the Advanced button

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

Change "Build/Products" to "build/Build/Products"

2) If (1) doesn't work for you then open your project from xcode go to project navigator and select your project name --> go to info --> use debug for command-lines builds.

do this

3) go to terminal and react-native run-ios

查看更多
家丑人穷心不美
3楼-- · 2020-03-19 03:50

Usually, this error comes up due to inconsistent versions (either of react-native, OS or XCode). I had the same issue with react-native v0.57.0 on MacOS Sierra and XCode v9.x. All I had to do was to upgrade to High Sierra and then XCode to v10.0.

Otherwise, you'd have to use an older version of react-native either by downgrading it or by initialising a project with an older version

react-native init test --version react-native@0.x.x
查看更多
时光不老,我们不散
4楼-- · 2020-03-19 03:51

Run the command

react-native upgrade
react-native run-ios

or

react-native run-android

this was solved when am faced this issue

查看更多
登录 后发表回答