LoginSignup
2
3

More than 5 years have passed since last update.

react-native run-iosが「Print: Entry, ":CFBundleIdentifier", Does Not Exist」でBUILD FAILEDになった時の対処法

Posted at

昨日からReactNativeを始め、詰まったのでメモがてらQiitaに書いておきます。

環境

  • macOS: Sierra
  • xcode: Version 8.2.1 (8C1002)
  • node: v10.12.0
  • react-native-cli: 2.0.1
  • react-native: 0.57.4

各々調べて書いてましたが、react-native infoで楽々調べられます。

エラー詳細

>react-native run-ios
---一部抜粋---
** BUILD FAILED **

The following build commands failed:


CompileC /Users/xxxxxxxx/react-native/hello_world/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/React.build/Objects-normal/x86_64/RCTShadowView+Internal.o Views/RCTShadowView+Internal.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler

(1 failure)


Installing build/Build/Products/Debug-iphonesimulator/hello_world.app

An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):

Failed to install the requested application

An application bundle was not found at the provided path.

Provide a valid path to the desired application bundle.

Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/hello_world.app/Info.plist

Print: Entry, ":CFBundleIdentifier", Does Not Exist


Error: Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/hello_world.app/Info.plist

Print: Entry, ":CFBundleIdentifier", Does Not Exist

    at checkExecSyncError (child_process.js:611:11)
    at Object.execFileSync (child_process.js:629:13)
    at Promise.then (/Users/xxxxxxxx/react-native/hello_world/node_modules/react-native/local-cli/runIOS/runIOS.js:208:5)

解決方法

macOSとxcodeをアップグレードしたらいけました。
macOS: SierraHigh Sierra
xcode: Version 8.2.1 (8C1002)Version 10.0 (10A255)

見た記事

React Nativeでinit直後のPrint: Entry, ":CFBundleIdentifier", Does Not Existを直した
→自分の場合ios/build/Build/Products/Debug-iphonesimulator/配下に諸々ファイルが作成されていた。

React NativeでiOS実行時に"CFBundleIdentifier Does Not Exist"となってしまう場合の対処
→これ試して見ましたが、解決せず・・・

Can't see iOS 11 simulators in OpenSim #37
→これを見て解決にいたりました。xcrun simctl list devicesでほぼ全端末が(unavailable, runtime profile not found)になるのでおかしいなと思ってunavailable, runtime profile not foundで検索してこれに辿りつきました。xcrun simctl list -j devicesの方が個人的に見やすいと思いました。

役に立つコマンド

# 利用できるデバイスを確認する
xcrun simctl list devices

# 利用できるデバイスをjson形式で確認する
xcrun simctl list -j devices

# デバイスを指定してシミュレーターを起動する
react-native run-ios --simulator="iPhone X"

最後に

本質的な問題解決にはなっておりませんが、メモがてら残しておきます。何かツッコミ等ありましたら、コメント頂けますと幸いです:bow:

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3