iOS IAP Status?

Greetings -

I’m wondering what the status is of IOS IAP support.

I’ve tried to use the official inappstore plugin (GitHub - godotengine/godot-ios-plugins) … I got it to build, but the instructions stop at what to do from there.

I’ve looked through Google results, forum posts, and it seems like this is a part of Godot that isn’t getting a lot of love.

But … isn’t this one of the top targets for game development? Are people really not using Godot to build commercial iOS apps?

Anyone have any recent experience with adding IAP to an iOS app they can share? A tutorial that worked?

Thanks
– Steve

Some progress … so after building (or downloading) the plugin, the docs on where to put it are here:

So:

  • Copy the files from the plugin (the .gdif file and the xcframeworks) into ios/plugins
  • Go into the Project Settings in Godot and in the Plugins section, the plugin should be there. Defaults to not enabled for some reason. Enable it.
  • Export for iOS

I do this, and now I have a pile of linker errors (below).

Any suggestions for what to do next? Rebuild the plugin for Godot 4? The last release attached to the godot-ios-plugins repo is from 2022.

Thanks.


Showing All Messages
Ld /Users/stevex/Library/Developer/Xcode/DerivedData/synergy-eufxfvohkdynbydkypzmvrcptchr/Build/Products/Debug-iphoneos/synergy.app/synergy normal (in target 'synergy' from project 'synergy')
    cd /Users/stevex/src/fallday/synergy-ios
...snip...
Undefined symbol: _err_print_error(char const*, char const*, int, char const*, ErrorHandlerType)

Undefined symbol: _err_print_error(char const*, char const*, int, char const*, char const*, ErrorHandlerType)

Undefined symbol: _err_print_index_error(char const*, char const*, int, long long, long long, char const*, char const*, char const*, bool)

Undefined symbol: D_METHOD(char const*)

Undefined symbol: MemoryPool::max_memory

Undefined symbol: MemoryPool::alloc_count
...snip...
Linker command failed with exit code 1 (use -v to see invocation)

This is because the plugins needed to be recompiled. I built the plugins following the instructions and replaced the binaries with what I built, and no more link errors. I haven’t tested the plugin functionality yet but seems like progress.

Will post again when I see the plugin working.

I just went through this earlier this week and made myself some notes as I followed the guide, I’ll post it below. I’ve managed to be able to get ahold of the plugin within my code using _appstore = Engine.get_singleton('InAppStore')
But I’ve been unsuccessful at making a purchase, when I attempt to call var result = _appstore.request_product_info( { "product_ids": ["bundle_01"] } )
it comes back with ‘31’ and ‘invalid_product_ids’:[“bundle_01”]’

I don’t know if this is some kind of issue with how I set up my IAP within iTunesConnect, or an issue with a provisioning profile, or something else. I’ve spent the last 3 days working on this and haven’t made any progress. If anyone has any suggestions I would love to hear them. This was honestly my biggest concern about using Godot, I had hoped that these integrations would be further along than they appear to be. I started my project about a year ago hoping mobile support would catch up.

Anyway, here are my notes:

Following this guide:

with help from this:
https://www.reddit.com/r/godot/comments/1af8nk1/compiling_on_macos/

at Step 4 to use this command:
scons target=editor arch=arm64 simulator=no plugin=inappstore version=4.2.2

download the “all” tar file

then use this command (with appropriate path to ios sdk):
scons target=editor arch=arm64 simulator=no plugin=inappstore version=4.2.2 vulkan_sdk_path=‘/Users/robbyc/Downloads/MoltenVK/MoltenVK/MoltenVK.xcframework/macos-arm64_x86_64’

Step 6
cd godot
scons target=template_debug arch=arm64 simulator=no plugin=inappstore version=4.2.2 vulkan_sdk_path=‘/Users/robbyc/Downloads/MoltenVK/MoltenVK/MoltenVK.xcframework/macos-arm64_x86_64’
cd …
./scripts/generate_static_library.sh inappstore release_debug 4.0
./scripts/generate_xcframework.sh inappstore release_debug 4.0
cd godot
scons target=template_release arch=arm64 simulator=no plugin=inappstore version=4.2.2 vulkan_sdk_path=‘/Users/robbyc/Downloads/MoltenVK/MoltenVK/MoltenVK.xcframework/macos-arm64_x86_64’
cd …
./scripts/generate_static_library.sh inappstore release 4.0
./scripts/generate_xcframework.sh inappstore release 4.0

Ok I ended up getting my test purchases working through TestFlight. I kept getting “invalid_product_ids” and I finally discovered that this was due to my developer account not having a tax id. I had already configured a bank account and all the other agreements were signed but I guess everything needs to be completed in order to get transactions to go through. It took about an hour after I submitted the last detail before transactions started working.

Also, I have my IAPs configured in App Store Connect but not submitted, their state is “Ready to Submit”. Hopefully following that guide to compile your own plugins helps you get to a state where things start working.

Don’t use the iOS Plugin provided by Godot. It’s been announced and marked as deprecated since WWDC '24. It’s based on Storekit 1 which has been around since 2009.

I keep discussing this with developers and trying to raise awareness on this very blatant opinion by FOSS developers of “ew money in video games is bad”.