-
Clone this repository and it's submodules:
git clone --recurse-submodules https://github.com/godotengine/godot-ios-plugins
You might require to update
godot
submodule in case you require latest (unreleased) Godot changes. To do this run:cd godot git fetch git checkout origin/<branch you want to use>
-
Alternatively you can use pre-extracted Godot headers that will be provided with release tag at Releases page.
To do this clone this repo without submodules:git clone https://github.com/godotengine/godot-ios-plugins
Then place extracted Godot headers in
godot
directory.
If you choose this option you can skip next step to genarate of Godot headers. -
To generate Godot headers you need to run compilation command inside
godot
submodule directory. Example:scons platform=iphone target=debug
You don't have to wait for full engine compilation as header files are generated first, so once an actual compilation starts you can stop this command.
-
Running
scons target=<debug|release|release_debug> arch=<arch> simulator=<no|yes> plugin=<plugin_name> version=<3.2|4.0>
will generate
.a
static library for chosen target.
Do note, that Godot's defaultdebug
export template is compiled withrelease_debug
target.
-
Run
./scripts/generate_static_library.sh <plugin_name> <debug|release|release_debug> <godot_version>
to generatefat
static library with specific configuration. -
The result
.a
binary will be stored inbin
folder.
-
Run
./scripts/generate_xcframework.sh <plugin_name> <debug|release|release_debug> <godot_version>
to generatexcframework
with specific configuration.xcframework
allows plugin to support botharm64
device andarm64
simulator. -
The result
.xcframework
will be stored inbin
folder as well as intermidiate.a
binaries.