React Native IOS Build CFBundleIdentifier 不存在 [英] React Native IOS Build CFBundleIdentifier Does not Exist

查看:34
本文介绍了React Native IOS Build CFBundleIdentifier 不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了示例 React Native 项目,并按照 React Native 网站的教程进行操作.

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

我尝试运行应用程序 IOS 模拟器,其抛出错误如下,

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

我的环境设置信息,

  • 节点版本 v9.8.0 npm 版本 5.6.0 react-native-cli: 2.0.1反应原生:0.54.2 xcode 9.2

请帮助我们解决问题.

推荐答案

init 后我也遇到了同样的问题:

I have the same problem right after init:

react-native init myappcd myappreact-native run-ios

..虽然 run-android 很好.

..although run-android was fine.

暂时不是解决方案,而是一种解决方法,可能是使用较低版本的 RN 进行初始化:

Not a solution but a workaround for the moment, maybe be to init using a lower version of RN:

react-native init myapp --version react-native@0.51.0

构建没问题.与现有项目类似,安装旧版本的 RN.

That builds okay. Similar in an existing project, install an older version of RN.

0.54.2 之前的其他版本可能有效,但我没试过.

Other versions before 0.54.2 might work but I haven't tried.

(2018/4/2 编辑)从这个链接找到我的解决方案:https://github.com/facebook/react-native/issues/18238

(edited 2018/4/2) Found my solution from this link: https://github.com/facebook/react-native/issues/18238

RN 0.54 要求类型自 iOS 11 起可用.因此您必须升级 xcode 并将应用中的最低 iOS 版本设置为 11

RN 0.54 requires types available since iOS 11. So you have to upgrade your xcode and set minimum iOS version in your app to 11

简而言之,升级的 OSX &Xcode 到最新.(截至今天,OSX 10.13.4 Xcode 和 9.3)

In short, upgraded OSX & Xcode to the latest. (As of today, OSX 10.13.4 Xcode & 9.3)

这篇关于React Native IOS Build CFBundleIdentifier 不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆