chore(game): update godot-iap to 3.6.1 and prepare the reference docs - #7
Merged
Merged
Conversation
The shim called the wrapper's private _native_plugin and _call_apple_async to keep a failed purchase query apart from an empty list. The wrapper already does that publicly: get_available_purchases_result() and restore_purchases() report failure separately, so the backend calls them and the shim goes. On Android, restore is now the wrapper's purchase query instead of the native restorePurchases(), which also emitted purchase_updated per row. The shop's follow-up sync already verifies and grants every row, so nothing is lost. Tests now run queries and restore through the real wrapper with a fake native bridge, including the typed round trip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
godot-iap's types.gd declares an IapStore enum, and a global autoload with the same name stops its `var store: IapStore` fields from parsing. The vendored copy carried a local edit to get around that. Naming the autoload Shop removes the clash, so types.gd is the official file again and the vendor test pins its hash. Only the global name and the three /root paths change; the script file, save data, and product IDs stay the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vendor the official godot-iap-3.6.1 zip. Its SHA-256 matches the release asset digest and the release-godot.yml build attestation. The AARs, iOS frameworks, and types.gd are byte-identical to 3.5.1. Two local patches remain: the 600 s iOS restore timeout (upstream still uses 120 s, and AppStore.sync() sign-in sheets can outlast it) and exporting the iOS descriptor kept as .gdextension.ios, which desktop Godot 4.7 cannot skip. The fix_ios_embed.sh patches are upstream since 3.5.2, and the direct-distribution guard only silenced a log line in the itch.io APK. 3.6 leaves res://iapkit.cfg out of release exports, which would drop the IAPKit key from the Play release AAB and the App Store archive, so store exports now write res://iapkit_publishable.cfg. The Play preset pins openiap/android_store="play" so a debug AAB never links another store's flavor from an attached device. The locale check skips vendored addons, whose env-var names look like translation keys. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scripts/ios.mjs hard-coded team PRDQGB267K, so a copy of the project could not sign with its own team. It now reads MOONLIT_APPLE_TEAM_ID and keeps PRDQGB267K as the default. Every xcodebuild call already passes DEVELOPMENT_TEAM, so release checks expect the archive to carry that team; the export preset keeps the default because Godot requires a value there. The App Store release helper reuses the same default, and a test keeps it in step with the preset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Monetize still said live sales stay off, but the App Store listing shows all 10 items under In-App Purchases and the Play listing is marked "In-app purchases". Section 9 now frames the store-side steps as work a copy of the project repeats. The flow sample adds the result-form purchase query the game uses, and third-party.md counts all 10 items. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The release verdict was never ticked although the App Store listing shows all 10 items with prices and the Play listing is marked "In-app purchases". Record that dated status and leave a TODO for the maintainer to tick what was verified; nothing is checked off on their behalf. Also name the key file store exports now write, and bump the store-page credits to godot-iap 3.6.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the short godot-iap note in the README with "Using this as a reference": what the project shows (one-time products and consumables, IAPKit verification, finish or consume, restore, resume sync, refunds; no subscriptions), what a copy must change to run purchases, and how the vendored addon and iOS frameworks are wired. CONTRIBUTING and AGENTS.md pick up the 3.6.1 version and the iapkit_publishable.cfg name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub reported the license as "Other" because a third-party asset note followed the MIT text. The note moves to THIRD_PARTY_NOTICES.md, which the README links, so LICENSE now matches the standard MIT template. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The locale check skipped every addons/ directory, so a missing key used from a future addon script would pass; it now skips only the vendored godot-iap addon, whose environment-variable names look like keys. The hygiene check also fails when iapkit.cfg or iapkit_publishable.cfg is committed, instead of relying on .gitignore alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The game now vendors the official godot-iap 3.6.1 zip (SHA-256 matches the release digest and its build attestation). Two local patches remain: the 600 s iOS restore timeout (upstream is still 120 s) and exporting the iOS descriptor kept as
.gdextension.ios, which desktop Godot 4.7 cannot skip. Thefix_ios_embed.shpatches are upstream since 3.5.2, and the direct-distribution guard is no longer needed.The shim that read the addon's private
_native_pluginand_call_apple_asyncis gone. The backend calls the publicget_available_purchases_result()andrestore_purchases(), so a failed query still never reads as "no purchases". TheIapStoreautoload is renamed toShop, which letstypes.gdstay the official file.3.6 also stops putting
res://iapkit.cfgin release exports. That is where store exports wrote the IAPKit key, so the Play release AAB and the App Store archive would have shipped without it. Store exports now writeres://iapkit_publishable.cfg, and the Play preset pinsopeniap/android_store="play".Also in this PR: a "Using this as a reference" section in the README; the iOS team ID now comes from
MOONLIT_APPLE_TEAM_ID, defaulting toPRDQGB267K; Monetize and the IAP setup notes now say sales are live; and the asset note moves from LICENSE toTHIRD_PARTY_NOTICES.md, so GitHub can detect MIT. The release verdict innotes/release/iap-store-setup.mdhas a TODO for you: I could not confirm which of its boxes were verified before launch.Lesson impact
None. Only the Monetize reference page changed.
Checks
pnpm verifyis green (run withMOONLIT_PYTHONset to a Python that has Pillow)Phasewordingapps/game/changed, so the capture fingerprints are stale; nothing was recaptured.Exports, built with throwaway keystores and a fake IAPKit key: the direct APK and the debug and release Play AABs pass the CI boundary checks, and the release AAB carries exactly one pk-only
iapkit_publishable.cfg.pnpm ios:exportprints theRuntime embed checkline, and an iOS release export keeps the key file. Device purchases were not run.