React Native:“:CFBundleIdentifier",不存在 [英] React Native: ":CFBundleIdentifier", Does Not Exist

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

问题描述

这个错误似乎对每种情况都非常具体,因为我已经尝试了这篇文章中的所有内容:

在高级选项卡中我有:

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

给了我这个:

cd ios➜ ios git:(release/3.6.2_build) ✗ pod 安装zsh:找不到命令:pod

凭直觉,我想我会在重新安装相同版本后尝试删除并重新安装 react-native-splash-screen,然后运行 ​​react-native link react-native-splash-screen 我不不再收到有关闪屏的错误,而是我收到此错误:<代码> 导致:哨兵报告了一个错误:您无权执行此操作.(http 状态:403)

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

上述错误是否意味着我需要一个 auth.token?如果是这样,这与安全令牌有什么不同吗?

解决方案

根据我从一位评论这里的同事那里得到的线索,我找到了这篇文章: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.6react-native 链接 react-native-splash-screen

果然闪屏错误消失了.

It seems this error is very specific to each case because I have tried everything in this post: Print: Entry, ":CFBundleIdentifier", Does Not Exist

I have also tried almost everything in this post, I stopped at May 22, 2018 where auxilioivy makes a recommendation for a symlink: https://github.com/facebook/react-native/issues/7308

Before I do a symlink, I am reaching out you all.

Upgrading my React Native is not an option.

I have the following:

"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"
      }
    },

The error is referring to my ios/AppName-tvOS/Info.plist:

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

The actual error says this:

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

The splash-screen error is in reference to this line in AppDelegate.m:

#import "SplashScreen.h"

but I don't know how that is related. I am using the Simulator for XCode 10.1 and High Sierra OSX. Also if I go to File -> Project Settings:

And inside Advanced tab I have:

The last thing I tried following one of the recommendations here: https://github.com/facebook/react-native/issues/21382

gave me this:

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

On a hunch I thought I would try removing and reinstalling react-native-splash-screen after I reinstalled the same version and then ran react-native link react-native-splash-screen I no longer get the error about splash-screen instead I get this error: caused by: sentry reported an error: You do not have permission to perform this action. (http status: 403)

Could this mean the splash-screen error is resolved and now I am on to something else like a Sentry auth token issue?

Would the above error mean I need an auth.token? If so, is that different from a security token?

解决方案

So on clues that I got from a colleague who commented on here, I found this article: https://medium.com/handlebar-labs/how-to-add-a-splash-screen-to-a-react-native-app-ios-and-android-30a3cec835ae

I decided to uninstall react-native-splash-screen@3.0.6 and reinstall it like so:

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

Sure enough the splashscreen error went away.

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

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