23
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

updated at

React NativeでiOS実行時に"CFBundleIdentifier Does Not Exist"となってしまう場合の対処

環境

  • Xcode 8.0 beta4
  • React Native 0.31.0

参考

Issue 8584

現象

上記環境で新規プロジェクトを作成した後、iOSで実行しようとすると以下のようなエラーが出てくる

** BUILD FAILED **


The following build commands failed:
    CompileC ${PROJECT_HOME}/ios/build/Build/Intermediates/RCTWebSocket.build/Debug-iphonesimulator/RCTWebSocket.build/Objects-normal/x86_64/RCTSRWebSocket.o RCTSRWebSocket.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/${PROJECT_NAME}.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/ptimer.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

RCTSRWebSocketのコンパイルが失敗しているとの事

対処

XcodeでiOSプロジェクトを開く

プロジェクト直下に"ios"ディレクトリが作られているので、その中の"プロジェクト名.xcodeproj"を開く

RCTSRWebSocketのプロジェクト設定を開く

ファイル一覧の"Libraries"から"RCTSRWebSocket.xcodeproj"を選択

スクリーンショット 2016-08-14 22.08.14.png

コンパイル設定を変更する

フィルターをAllに変更し、"custom compiler flags"と検索する

スクリーンショット 2016-08-14 22.13.00.png

"Other Warning Flags"が"-Werror -Wall"となっているがこれを削除する

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
23
Help us understand the problem. What are the problem?