2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Compose Multiplatform で Android Studio から iOS Simulator を起動して実行する

2
Posted at

個人開発でKotlin Multiplatform(KMP), Compose Multiplatform(CMP)を採用し、Android Studio上からiOSをビルドする方法について調べたのでその手順をまとめました。

実行環境

Mac: Apple Silicon (M1) / macOS26.1
Android Studio:Android Studio Otter 3 Feature Drop | 2025.2.3 RC 3
XCode:Xcode Version 26.2

必須要件

  • XcodeがインストールされたmacOSマシン
  • IntelliJまたはAndroid Studio

2026/01/10時点では公式ドキュメントに以下のバージョン指定がありました。

Kotlin Multiplatform に必要なプラグインには、少なくともIntelliJ IDEA 2025.2.2またはAndroid Studio Otter 2025.2.1が必要です。

セットアップ手順

Xcodeでの準備

Xcodeを一度も起動したことがない場合は初期セットアップをする必要があるので起動します。
初回起動時のセットアップ(追加コンポーネントのインストール)を完了したら準備は完了です

Android Studioでの準備

  1. KMPプラグインの導入
    Android Studio上でiOSをビルドするために必要なプラグインKotlin Multiplatformをインストールします
    追加後、「Restart IDE」で再起動します

  2. iOS用のビルド構成を作成する
    何も設定していない状態ではiOSプロジェクトをビルドできないので、新しく構成を作ります。
    構成のリストからEdit Configurationsを選択

スクリーンショット 2026-01-10 20.48.26.png
「+」からXcode Applicationを選択し、Working directoryにプロジェクト内のiosAppを選択

スクリーンショット 2026-01-10 18.07.33.png

エミュレーターでビルドする

ここまで完了すれば後はビルドするのみです!
ドロップダウンからビルドする端末を選択し、Androidと同様に「Run(▶)で実行」をすればAndroid Studio上でiOSのシミュレーターが起動できます!

スクリーンショット 2026-01-10 20.52.34.png

追記

KMPプラグインを追加するとPreflightチェックツール(✈️マーク)がサイドバーに追加され、プロジェクト環境設定に問題がないかを確認することができます。
私の環境ではすべて問題なく設定ができていましたが、Xcodeのバージョンが高すぎてサポートがされていないと警告されました。ビルド自体は問題なくできました

スクリーンショット 2026-01-10 18.05.47.png

参考資料

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?