Up to date

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

Compilando para IOS

Ver también

Esta página describe cómo compilar binarios de plantillas de exportación para iOS desde el código fuente. Si estás buscando exportar tu proyecto a iOS, lee Exportando para iOS.

Requerimientos

If you are building the master branch:

  • Download and follow README instructions to build a static .xcframework from the MoltenVK SDK.

Nota

If you have Homebrew installed, you can easily install SCons using the following command:

brew install scons

La instalación de Homebrew también descargará automáticamente las Command Line Tools para Xcode si aún no las tienes.

Similarly, if you have MacPorts installed, you can easily install SCons using the following command:

sudo port install scons

Ver también

Para obtener el código fuente de Godot para compilarlo, consulta la sección Consiguiendo el código fuente.

Para obtener una visión general del uso de SCons para Godot, consulta la sección Introducción al sistema de compilación.

Compilando

Abre una Terminal, ve al directorio raíz del código fuente del motor y escribe:

$ scons p=ios target=template_debug

para una compilacion de depuración, o:

$ scons p=ios target=template_release

for a release build (check platform/ios/detect.py for the compiler flags used for each configuration).

Aternativamente, puede ejecutar

$ scons p=ios target=template_debug ios_simulator=yes arch=x86_64
$ scons p=ios target=template_debug ios_simulator=yes arch=arm64

for a Simulator libraries.

Para crear un proyecto Xcode como en paquetes oficiales, necesitas usar la plantilla ubicada en Para crear un paquete misc/dist/ios_xcode. Las librerías de lanzamiento y depuración deberán ubicarse en libgodot.ios.debug.xcframework y libgodot.ios.release.xcframework respectivamente.

$ cp -r misc/dist/ios_xcode .

$ cp libgodot.ios.template_debug.arm64.a ios_xcode/libgodot.ios.debug.xcframework/ios-arm64/libgodot.a
$ lipo -create libgodot.ios.template_debug.arm64.simulator.a libgodot.ios.template_debug.x86_64.simulator.a -output ios_xcode/libgodot.ios.debug.xcframework/ios-arm64_x86_64-simulator/libgodot.a

$ cp libgodot.ios.template_release.arm64.a ios_xcode/libgodot.ios.release.xcframework/ios-arm64/libgodot.a
$ lipo -create libgodot.ios.template_release.arm64.simulator.a libgodot.ios.template_release.x86_64.simulator.a -output ios_xcode/libgodot.ios.release.xcframework/ios-arm64_x86_64-simulator/libgodot.a

The MoltenVK static .xcframework folder must also be placed in the ios_xcode folder once it has been created.

Ejecutar

Para ejecutar en un dispositivo o simulador, sigue estas instrucciones: Exportando para iOS.