5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Axmol EngineをiOSシミュレータで動かす(macOS / Apple Silicon)

5
Posted at

環境

  • macOS(Apple Silicon: M1〜M4)
  • Xcode インストール済み
  • Homebrew インストール済み
  • CMake インストール済み
  • Axmol Engine セットアップ済み(axmol コマンドが使える状態)

セットアップに関しては下記ご参考ください


1. プロジェクトを作成する

axmol new -p com.yourname.mygame -d ~/dev -l cpp MyGame

cd ~/dev/MyGame
  • 既に作成済みであればスキップ

2. シミュレータ向けにビルドする

axmol build -p ios -a arm64 -sdk simulator -c

Apple Silicon Mac では -a x64 だとシミュレータが「unsupported architecture」になり選択できません。 -a arm64 -sdk simulator の組み合わせを使ってください。

ビルドが完了したら Xcode で開きます。

open build_ios_arm64_sim/MyGame.xcodeproj

3. Xcodeでシミュレータを選択する

Xcode 上部のデバイス選択欄で iPhone のシミュレータ(例:iPhone 17 Pro)を選択します。

「Any iOS Device」や実機名が選択されたままだとリンクエラーが出ます。必ずシミュレータを選んでください。


4. Metal API Validation を無効にする

こちらの環境ですと Run するとシミュレータ起動直後にクラッシュしましたので、解決方法を掲載します。

validateMTLSamplerDescriptor: failed assertion

MTLSamplerBorderColorTransparentBlack is not supported on this device

以下の手順で無効化します。

  1. Xcode 上部のターゲット名をクリック →「Edit Scheme...」を選択
  2. 左メニューで「Run」を選択
  3. 上部タブから「Diagnostics」を開く
  4. 下部の「Metal」グループ内にある「API Validation」のチェックを外す
  5. 「Close」で閉じる

5. Run する

▶️ ボタンを押す。

シミュレータに Hello World 画面が表示されれば成功です🎉

スクリーンショット 2026-06-19 11.31.45.png

5
3
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
5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?