0

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:

enter image description here

And inside Advanced tab I have:

enter image description here

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?

halfer
  • 19,824
  • 17
  • 99
  • 186
Daniel
  • 14,004
  • 16
  • 96
  • 156
  • `Print: Entry, ":CFBundleIdentifier", Does Not Exist` often is the output for a failed build. As you indicated in your question, the problem is with the line in AppDelegate.m, where it is importing `#import "SplashScreen.h"`. Find out where this file should be and why xcode build tool can't find it. – hyb175 May 30 '19 at 22:50
  • @hyb175, thank you for this clue. I did begin looking into it, but not with that question in mind. – Daniel May 30 '19 at 23:00
  • And just FYI if you are interested, cocoapods is a package management tool for ios native dependencies, which has the command `pod`, so unless you are using cocoapods to manage your ios dependencies, `pod` is not relevant here. – hyb175 May 30 '19 at 23:03
  • @hyb175, no never used cocoapods to manage packages although I did see it referenced here `PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";` when I was looking into what this `CFBundleIdentifier org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)` was referencing. – Daniel May 30 '19 at 23:07
  • @hyb175, 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 splashscreen 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 be the splashscreen error is resolved and now I am on to something else like a Sentry auth token issue? – Daniel May 31 '19 at 12:40

1 Answers1

1

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.

Daniel
  • 14,004
  • 16
  • 96
  • 156