React Native:“:CFBundleIdentifier”,不存在

时间:2019-05-30 18:30:57

标签: xcode react-native

似乎此错误是针对每种情况的,因为我已经尝试了本文中的所有内容: Print: Entry, ":CFBundleIdentifier", Does Not Exist

我也在这篇文章中尝试了几乎所有内容,我于2018年5月22日停下来,其中auxilioivy提出了关于符号链接的建议: https://github.com/facebook/react-native/issues/7308

在我进行符号链接之前,我正在与大家联系。

不能升级我的React Native。

我有以下内容:

"react": "16.2.0",
"react-native": "0.53.3",
"react-native-xcode-packager": "^0.1.0",

"detox": {
    "configurations": {
      "ios.sim.debug": {
        "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/NFIBEngage.app",
        "build": "xcodebuild -workspace ios/NFIBEngage.xcworkspace -configuration Debug -scheme NFIBEngage -sdk iphonesimulator -derivedDataPath ios/build",
        "type": "ios.simulator",
        "name": "iPhone 6"
      }
    },

错误是指我的ios/AppName-tvOS/Info.plist

<key>CFBundleIdentifier</key>
    <string>org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)</string>

实际错误是这样的:

fatal error: 'SplashScreen.h' file not found
#import "SplashScreen.h"
        ^~~~~~~~~~~~~~~~
1 error generated.



** BUILD FAILED **


The following build commands failed:
    CompileC build/Build/Intermediates.noindex/NFIBEngage.build/Debug-iphonesimulator/PROD.build/Objects-normal/x86_64/AppDelegate.o NFIBEngage/AppDelegate.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

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

启动画面错误是与AppDelegate.m中的这一行有关的:

#import "SplashScreen.h"

但是我不知道那是怎么回事。请帮助某人,在我忘记使用XCode 10.1和High Sierra OSX的模拟器之前。另外,如果我转到文件-> 项目设置

enter image description here

在“高级”标签中,我有:

enter image description here

我尝试遵循此处的一项建议的最后一件事: https://github.com/facebook/react-native/issues/21382

给我这个:

cd ios
➜  ios git:(release/3.6.2_build) ✗ pod install
zsh: command not found: pod

直觉我以为我会在重新安装相同版本然后运行react-native link react-native-splash-screen之后尝试删除并重新安装react-native-splash-screen,但我不再遇到关于Splashscreen的错误,而是遇到了以下错误:{ {1}}

这是否意味着启动屏幕错误已解决,现在我要处理其他问题,例如Sentry身份验证令牌问题?

以上错误是否表示我需要一个caused by: sentry reported an error: You do not have permission to perform this action. (http status: 403)?如果是这样,那与安全令牌有什么不同?

1 个答案:

答案 0 :(得分:0)

因此,从我从一位对此发表评论的同事那里获得的线索中,我找到了这篇文章: https://medium.com/handlebar-labs/how-to-add-a-splash-screen-to-a-react-native-app-ios-and-android-30a3cec835ae

我决定卸载react-native-splash-screen@3.0.6,然后像这样重新安装:

npm install react-native-splash-screen@3.0.6
react-native link react-native-splash-screen

确定闪屏错误消失了。