Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

iOS用にエクスポート

参考

This page describes how to export a Godot project to iOS. If you're looking to compile export template binaries from source instead, read iOS用のコンパイル.

これらは、XcodeでGodotプロジェクトを読み込む手順です。これにより、iOS デバイスにビルドして展開し、AppStore用のリリースをビルドし、Xcodeで通常実行できるその他のすべてを実行できます。

注意

Projects written in C# can be exported to iOS as of Godot 4.2, but support is experimental and some limitations apply.

必要条件

  • XcodeがインストールされているmacOSを実行しているコンピュータからiOS用にエクスポートする必要があります。

  • Godotエクスポートテンプレートをダウンロードします。Godotメニューを使用する: エディタ > エクスポート テンプレートの管理

GodotプロジェクトをXcodeにエクスポートする

Godotエディタで、プロジェクト メニューから エクスポート ウィンドウを開きます。エクスポートウィンドウが開いたら、追加..をクリックし、iOS を選択します。

The App Store Team ID and (Bundle) Identifier options in the Application category are required. Leaving them blank will cause the exporter to throw an error.

注釈

If you encounter an error during export similar to
JSON text did not start with array or object and option to allow fragments not set
then it might be due to a malformated App Store Team ID!
The exporter expects a (10 characters long) code like ABCDE12XYZ and not, e.g., your name as Xcode likes to display in the Signing & Capabilities tab.
You can find the code over at developer.apple.com next to your name in the top right corner.

プロジェクトのエクスポート をクリックした後、2つの重要なオプションが残っています:

  • パスは、エクスポートされたXcodeプロジェクトファイルを含む空のフォルダです。

  • ファイルは、Xcodeプロジェクトといくつかのプロジェクト固有のファイルとディレクトリの名前になります。

../../_images/ios_export_file.png

注釈

このチュートリアルでは、exported_xcode_project_nameを使用しますが、プロジェクトの名前を使用します。次の手順でexported_xcode_project_nameが表示された場合は、代わりに使用した名前に置き換えます。

注釈

**exported_xcode_project_name ** を修正するときに名称にスペースを使用しないでください。XCodeプロジェクトファイルが破損する可能性があります。

エクスポートが完了すると、出力フォルダは次のようになります:

../../_images/ios_export_output.png

exported_xcode_project_name.xcodeprojを開くと、他のiOSアプリと同様にビルドおよびデプロイできます。

積極的な開発に関する考慮事項

上記の方法では、リリース用にビルドできるエクスポートされたプロジェクトを作成しますが、Godotを変更するたびに再エクスポートする必要があります。

開発中は、Godotプロジェクトファイルをアプリに直接リンクすることで、このプロセスを高速化できます。

次の例を参照してください:

  • exported_xcode_project_nameは、エクスポートされたiOSアプリケーションの名前です(上記のように)。

  • godot_project_to_exportはGodotプロジェクトの名前です。

注釈

godot_project_to_export must not be the same as exported_xcode_project_name to prevent signing issues in Xcode.

iOS用プラグイン

特別なiOSプラグインをGodotで使用することができます。doc_services_for_ios ページを確認してください。

環境変数

You can use the following environment variables to set export options outside of the editor. During the export process, these override the values that you set in the export menu.

iOS export environment variables

Export option

Environment variable

Encryption / Encryption Key

GODOT_SCRIPT_ENCRYPTION_KEY

Options / Application / Provisioning Profile UUID Debug

GODOT_IOS_PROVISIONING_PROFILE_UUID_DEBUG

Options / Application / Provisioning Profile UUID Release

GODOT_IOS_PROVISIONING_PROFILE_UUID_RELEASE