はじめに
タイトル通りですが、XcodeをアップデートしたくてmacOSも同時にMontereyにアップデートさせました。
するとアプデ前まで正常にシュミレーターでビルドできていたのに、👇のようなエラーで失敗するようになりました。。。。
Unable to install /Users/userName/flutter/insta/build/ios/iphonesimulator/Runner.app on DE709473-59D9-47A3-AE88-A4F9A756EE21. This is sometimes caused by a malformed plist file:
ProcessException: Process exited abnormally:
An error was encountered processing the command (domain=NSMachErrorDomain, code=-308):
The operation couldn’t be completed. (Mach error -308 - (ipc/mig) server died)
Command: xcrun simctl install DE709473-59D9-47A3-AE88-A4F9A756EE21 /Users/userName/flutter/insta/build/ios/iphonesimulator/Runner.app
Error launching application on iPhone SE (3rd generation).
とりあえずflutter doctor
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.0, on macOS 12.3.1 21E258 darwin-x64, locale
ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 13.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.66.2)
[✓] Connected device (1 available)
[✓] HTTP Host Availability
• No issues found!
何も問題はなさそう・・・
エラーメッセージに書いてあるコマンドを試してみる
xcrun simctl install DE709473-59D9-47A3-AE88-A4F9A756EE21
Install an app on a device.
Usage: simctl install <device> <path>
何も変わりませんでした・・・
simctlとは
Xcodeに含まれる標準CLIツールで、主にシミュレータの管理を行うための機能を備えています。
https://qiita.com/tamaki/items/02eb43253193b950b08f
よくわからんがflutter pub get
で解決?
flutter pub get
した後、なぜかiOSシュミレーターでビルド成功するようになりました!
ios/Runner.xcodeproj
からXcodeで開いてビルドしてみると、 「firestoreが見つからない!」 と言われていた・・・。なんでやろう・・。
なのでとりあえずflutter pub get
してみました。
「domain=NSMachErrorDomain, code=-308」とかで検索しても全然ヒントが出てこなかったので、わかる人いたらコメントお願いします〜!!!