Godot iOS plugins - Outdated README.md?

Godot Version

4.5.1

Question

These past few days, I’ve been trying to get the APN iOS plugin working. I tried to follow the main readme.

However, I haven’t been able to build the required files. While following the readme of the main repo, I sometimes need to make tweaks to continue (instead of “debug”, I need to write “template_debug” for the target, as an example). I wonder if the readme is outdated?

I did notice this comment on a recent issue. However, following this yielded other errors.

Am I doing something wrong? Would anyone be willing to write an updated walkthrough?

Here’s where it goes wrong for me specifically:

  • :white_check_mark: I clone the repo using git clone --recursive
  • :white_check_mark: I cd into the “godot” subfolder
  • :white_check_mark: scons platform=ios target=debug, and then CTRL + C to stop (since headers are built first)
  • :white_check_mark: scons target=release_debug arch=arm64 simulator=no plugin=apn version=4.0
  • :prohibited: The next step is to run ./scripts/generate_static_library.sh <plugin_name> <debug|release|release_debug>, which is not there.
  • Building an .xcframework fails with error “platform_config.h file not found”

Was finally able to build the APN plugin using bruvzg’s 4.5 PR.

It turns out I wasn’t using the exact correct git branches for the plugin repo itself and the godot submodule. When cloning the plugin repo, you have to specify the 4.5 branch. After cloning, you need to checkout the 4.5-stable branch of the main godot repo. Only this specific combination seemed to work for me.

There is still some information missing in the readme.

  • In some of the scons commands you need to use target=template_debug instead of target=debug. You will get an error if needed.
  • It is specified that the first scons command needs to run in the “godot” subfolder, but it should also be specified that the next scons command should be run in the godot-ios-plugins root folder.
  • The .a-library is not needed - use the .xcframework instead.
  • After building, you need to copy the .xcframework folder into your godot project, along with the .gdip file in the plugin folder (from the repo).
  • You also need to check the .gdip file to make sure that binary=”whatever” corresponds to the xcframework folder name. I renamed my xcframework folder name to match the .gdip.

Here’s the folder structure I ended up with. I kept the plugin-specific readme, for reference.

The readme explains the rest in a pretty straightforward way. So far, I’ve tested it on my device, and got a “Do you want to allow notifications?”-prompt, and confirmed that I was able to get my device token.

1 Like