Integrate
Learn how to integrate Offer Codes in your app.
Once everything is set up in App Store Connect and WinWinKit, you need to add support for Offer Codes in your app.
Support Offer Codes
When a user is rewarded with an Offer Code, there is two ways they can redeem it:
- through a redemption URL, which opens the App Store
- directly in your app.
WinWinKit supports both ways, so you can choose which one to use. However, we recommend you implement support for both ways.
Redemption URL
Follow the Apple’s documentation to implement support for Offer Codes redeemed outside of your app:
Support offer codes redeemed outside of your app
If you use RevenueCat, you don’t need to implement this, as their SDK listens for updates
on Transaction
already.
Inside app
Follow the Apple’s documentation to implement support for Offer Codes redeemed in your app:
Redeem offer codes in your app
Essentially you only need to present a native sheet where user can enter the Offer Code value.
Retrieve and Redeem Offer Code
WinWinKit provides Offer Code value for active rewards for the user.
Available Offer Code reward and value can be retrived on the User
object.
Retrieving Offer Code value with Swift SDK:
For new users, redeeming an Offer Code is starting a subscription in your app.
For existing users, redeeming an Offer Code is starting, adding, changing, renewing or getting temporary discount on a subscription in their account. What happens depends on the subscription type and the Offer Code they redeem.
For more information please refer to the App Store Connect documentation:
Supporting offer codes | Design Guidelines