ptmt / react-native-macos

[deprecated in favor of https://microsoft.github.io/react-native-windows/] React Native for macOS is an experimental fork for writing desktop apps using Cocoa
MIT License
11.24k stars 429 forks source link

Entry, ":CFBundleIdentifier", Does Not Exist #199

Closed recound closed 6 years ago

recound commented 6 years ago

first i've encounter with https://github.com/ptmt/react-native-macos/issues/174 then

The following build commands failed:
    Ld build/Build/Products/Debug/Bedrock1.app/Contents/MacOS/Bedrock1 normal x86_64
(1 failure)
Launching build/Build/Products/Debug/Bedrock1.app
The application cannot be opened because its executable is missing.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug/Bedrock1.app/Contents/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

right after new project init, on yarn run macos command Xcode Version 9.4 (9F1027a) macOS high sierra 10.13.5 node v8.7.0 react-native-macos-cli: 2.0.1 react-native-macos: 0.18.0-alpha.3 more expanded log:

Ld build/Build/Products/Debug/Bedrock1.app/Contents/MacOS/Bedrock1 normal x86_64
    cd /Users/recound/Projects/Bedrock1/macos
    export MACOSX_DEPLOYMENT_TARGET=10.13
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -L/Users/recound/Projects/Bedrock1/macos/build/Build/Products/Debug -F/Users/recound/Projects/Bedrock1/macos/build/Build/Products/Debug -filelist /Users/recound/Projects/Bedrock1/macos/build/Build/Intermediates.noindex/Bedrock1.build/Debug/Bedrock1.build/Objects-normal/x86_64/Bedrock1.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mmacosx-version-min=10.13 -Xlinker -object_path_lto -Xlinker /Users/recound/Projects/Bedrock1/macos/build/Build/Intermediates.noindex/Bedrock1.build/Debug/Bedrock1.build/Objects-normal/x86_64/Bedrock1_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -ObjC -lc++ /Users/recound/Projects/Bedrock1/macos/build/Build/Products/Debug/libRCTBlob.a /Users/recound/Projects/Bedrock1/macos/build/Build/Products/Debug/libRCTAnimation.a /Users/recound/Projects/Bedrock1/macos/build/Build/Products/Debug/libReact.a /Users/recound/Projects/Bedrock1/macos/build/Build/Products/Debug/libRCTImage.a /Users/recound/Projects/Bedrock1/macos/build/Build/Products/Debug/libRCTLinking.a /Users/recound/Projects/Bedrock1/macos/build/Build/Products/Debug/libRCTNetwork.a /Users/recound/Projects/Bedrock1/macos/build/Build/Products/Debug/libRCTSettings.a /Users/recound/Projects/Bedrock1/macos/build/Build/Products/Debug/libRCTText.a /Users/recound/Projects/Bedrock1/macos/build/Build/Products/Debug/libRCTWebSocket.a -Xlinker -dependency_info -Xlinker /Users/recound/Projects/Bedrock1/macos/build/Build/Intermediates.noindex/Bedrock1.build/Debug/Bedrock1.build/Objects-normal/x86_64/Bedrock1_dependency_info.dat -o /Users/recound/Projects/Bedrock1/macos/build/Build/Products/Debug/Bedrock1.app/Contents/MacOS/Bedrock1
clang: error: no such file or directory: '/Users/recound/Projects/Bedrock1/macos/build/Build/Products/Debug/libRCTBlob.a'
xayoung commented 6 years ago

@recound same

DanielRHarris commented 6 years ago

@recound same

TrueMisterJeanP commented 6 years ago

Partially fixed, following this steps in Xcode project file.

Before, since i have a Apple developper account. 1.I select automatically manage signing in "Signing". 2.I enter my team in "Signing (Debug)".

After: 3.I select a application category in "Identity".

To fixe this error: 4.Change the bundle identifier in "Identity". For example, i replace "org.reactjs.native.example.myAppMacos" by my new identifier "com.EXAMPLE.myappmac" and it works.

-> The bundle identifier must contain capital letters.

Not work with react-native-macos run-macos ...

mattmillr-zz commented 6 years ago

I'm experiencing the same issue. The steps @TrueMisterJeanP describes do not fix it for me.

react-native-macos-cli: 2.0.1
react-native-macos: 0.18.0-alpha.3
marksturm commented 6 years ago

Same problem here: react-native-macos-cli: 2.0.1

The step by step fix of @TrueMisterJeanP do not fix it.

ptmt commented 6 years ago

Thanks for the feedback. It seems like a regression from the latest alpha. I'll try to fix on the weekend.

ptmt commented 6 years ago

Should be fixed in 0.18.0-alpha.5 by this https://github.com/ptmt/react-native-macos/commit/e49fd53046a0a4e06b6c3001c6ad9993263961a5 and this https://github.com/ptmt/react-native-macos/commit/dfc44a7e020acdc44bc124b51f87eb67e3b683ae

skyl commented 6 years ago

Looks like moving from 0.18.0-alpha.3 to 0.18.0-alpha.5 fixed this.