expoでiPhoneのエミュを立ち上げたら以下のエラー
Neact Nativeとexpoで開発を始めてから1ヶ月くらい経過したときに、iphoneのエミュを立ち上げた時に、急に以下のエラーが出た。
Started Metro Bundler
› Opening on iOS...
Error running `xcrun simctl help`: Xcode license is not accepted. Please run `sudo xcodebuild -license`.
XDLError: Xcode license is not accepted. Please run `sudo xcodebuild -license`.
Unable to verify Xcode and Simulator installation.
Contents
解決方法
MacOSでXcodeのAppをlaunchして、Agreeをする。
再度expo start から iphoneのシミュレータを起動したら、以下のエラー
xcrun exited with non-zero code: 2
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Unable to boot device because we cannot determine the runtime bundle.
No such file or directory
xcodeを立ち上げ -> Xcode メニュー -> Open Developer Tool -> Simulator でシミュレータを立ち上げたら、シミュレータメニューの Device -> Erase all content and settingsでセッティングをクリア。
で解決するとのことだが、Erase all content and settingsがグレー色の文字になっていて押せない。
この場合、アクティビティモニタとかで、XcodeとSimulatorのアプリを強制終了したあと、再度立ち上げる。すると、Erase all content and settingsを押さずとも、iPhoneのエミュが立ち上がった。
めでたし、めでたし。