【解決】BUILD FAILED ** The following build commands failed: ProcessInfoPlistFile build/Build/Products/Debug-iphonesimulator/App.app/Info.plist 【React Native】
経緯
新規にreact-nativeのプロジェクトを作って、react-native run-ios
を行ったら以下のようなエラーがでた。
** BUILD FAILED ** The following build commands failed: ProcessInfoPlistFile build/Build/Products/Debug-iphonesimulator/App.app/Info.plist App/Info.plist (1 failure) Installing build/Build/Products/Debug-iphonesimulator/App.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/App.app/Info.plist Print: Entry, ":CFBundleIdentifier", Does Not Exist
解決策
react-native upgrade
をしてyを連打して各所をupgradeしていくと直る。
何が起きたか探ると、ios/ReactNativeCameraApp.xcodeproj/project.pbxproj
がupgradeされたことで解決したようだ。
ちなみに、npm install -g react-native-git-upgrade
した後に、react-native-git-upgrade
でも同様にupgradeされるため解決すると思われる。(こちらの方が新しいupgrade toolらしい)