ios - react native 运行ios : The bundle identifier of the application could not be determined

标签 ios react-native

我正在使用 React-Native 并尝试构建一个 Hello-world 应用程序,但是,我仍然无法运行该应用程序。如果我运行 react-native run-ios,我会收到以下错误: ...

Build system information
unexpected service error: The Xcode build system has crashed. Please close and reopen your workspace.

Build system information
error: unexpected service error: The Xcode build system has crashed. Please close and reopen your workspace.


** BUILD FAILED **


The following commands produced analyzer issues:
    Analyze /Users/adam/react-native_dev/JustATributeApp/node_modules/react-native/React/Base/RCTModuleMethod.mm normal x86_64

(1 command with analyzer issues)

The following build commands failed:
    Analyze /Users/adam/react-native_dev/JustATributeApp/node_modules/react-native/Libraries/Text/RCTTextAttributes.m normal x86_64
(1 failure)

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

我发现很多主题都存在此错误,但没有一个能够解决该问题。

以下是一些附加信息:

react-native-cli: 2.0.1
react-native: 0.56.0
xcode 10.0 beta 2 (10L177m)

如何调试/修复此问题?

谢谢

最佳答案

错误消息的关键部分是确保应用程序的 Info.plist 包含 CFBundleIdentifier 的值。下面是我们解决此问题的方法。 在 Xcode 中打开 yourprojectname.xcodeproj,然后检查“常规”选项卡下的包标识符。它应该有一个值(value)。我的是 com.yourprojectname.app.ios.triplets 。如果该字段为空,请将包标识符设置为某项。修改此字段将会更改您的 info.plist。

关于ios - react native 运行ios : The bundle identifier of the application could not be determined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51487867/

相关文章:

iphone - 不使用 Interface Builder 修改 Nib 文件

ios - 以编程方式将 UISegmentedControl 添加到 UINavigationBar

ios - 无法从 XCode 6.1 导出 IPA 文件

javascript - react native : Opening URLs in Android (Equivalent to LinkingIOS. openURL)

ios - Swift - 如何以编程方式显示 “paste” 工具提示菜单?

iphone - 游戏中心。如何更改排行榜中显示点的外观?

javascript - React Native 某些样式导致 View 无法渲染

javascript - 在 react native 中对齐导航屏幕内容

reactjs - React Native 状态变量未从 props 更新

React-Native:使用 pagingEnabled 时在 FlatList 中获取当前页面