SubscriptionOfferView¶
Inherits: RefCounted < Object
A view for redeeming In-App Purchase offer codes.
Description¶
This class provides the Apple redemption sheet for offer codes. Offer codes can apply to consumables, non-consumables, non-renewing subscriptions, and auto-renewable subscriptions.
Create the offer in App Store Connect for the exact product before you call present(). No extra app entitlement is required. The success signal only confirms that the redemption flow completed. Deliver the purchased product when StoreKitManager emits StoreKitManager.transaction_updated, then call StoreTransaction.finish().
In-app redemption for consumables, non-consumables, and non-renewing subscriptions requires iOS or iPadOS 16.3 or later. It requires macOS 15 or later on Mac. For the complete workflow, see Using Apple’s StoreKit APIs with Godot.
Properties¶
String |
|
Methods¶
void |
dismiss() |
void |
present(callback: Callable) |
Signals¶
error(message: String) 🔗
Emitted when the offer redemption fails. arg1 contains the error message.
success() 🔗
Emitted when the offer redemption is successful.
Property Descriptions¶
String title = "Redeeming Offer..." 🔗
void set_title(value: String)
String get_title()
The title displayed on the view.
Method Descriptions¶
void dismiss() 🔗
Dismisses the currently presented view.
void present(callback: Callable) 🔗
Presents the Apple offer-code redemption sheet. The callback parameter is unused. Use success and error to handle the redemption flow. Use StoreKitManager.transaction_updated to deliver the product transaction.