FlutterでiOSビルド時に“iOS 18.4 is not installed”と表示されたときの対処法
【解決】FlutterでiOSビルド時に「iOS 18.4 is not installed」と表示されたときの対処法
Macを新しくした直後、FlutterでiOSアプリをビルドしようとしたところ、以下のようなエラーに遭遇しました:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
(base) MacBook-Pro:sakutore-nationalflags-en chico27$ flutter build ios Building jp.co.decryption.nationalflags.en2 for device (ios-release)... Developer identity "Apple Development: ◯◯ (933K7WKQVC)" selected for iOS code signing Running Xcode build... Xcode build done. 0.7s Failed to build iOS app Uncategorized (Xcode): Unable to find a destination matching the provided destination specifier: { generic:1, platform:iOS } Ineligible destinations for the "Runner" scheme: { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device, error:iOS 18.4 is not installed. To use with Xcode, first download and install the platform } ════════════════════════════════════════════════════════════════════════════════ iOS 18.4 is not installed. To download and install the platform, open Xcode, select Xcode > Settings > Components, and click the GET button for the required platform. For more information, please visit: https://developer.apple.com/documentation/xcode/installing-additional-simulator-runtimes ════════════════════════════════════════════════════════════════════════════════ Encountered error while building for device. |
🔍 原因
Xcodeに必要な「iOS 18.4 ランタイム」がインストールされていないためです。新しいMacやXcodeを初期状態で使うと、この状態になりやすいです。
✅ 解決手順
- Xcodeを起動
- 上部メニューから Xcode > Settings(または Preferences)を開く
- 「Components」タブをクリック
- iOS 18.4 の右側にある 「Get」 ボタンをクリック
これで約9GBのiOSランタイムがダウンロード・インストールされます。
🚀 再ビルド
ダウンロード完了後、Flutterで再度ビルドを実行すればOKです:
1 2 |
flutter build ios --release |
📝 補足
- インストールには数分〜十数分かかります。
- Xcode再起動は基本不要ですが、うまくいかない場合は試してみましょう。
- 複数のiOSランタイムが必要な場合も同様の手順で追加可能です。
✅ 結論
「iOS XX.X is not installed」エラーは、Xcodeの「Components」から該当ランタイムをダウンロードすれば簡単に解決できます。Macを変えたときやXcodeをアップデートした後は、まずこのチェックをしておくと安心です。
ディスカッション
コメント一覧
まだ、コメントがありません