I've seen a few topics on stackoverflow on promo codes handling: Detecting promo code, Handling promo code, Consumable promo codes and none of them have the right answer. There are some swift guides on how to create and redeem promo codes for in-app purchases, but nobody talks about what's happening later.
Redeeming an (in-app purchase) promo code on the AppStore:
- lets you open the app on successful redeeming
- notifies the transactionObserver declared preferably in the AppDelegate
Some people say it's all you have to do (and then when the user chooses payment there's suddenly no 9,99$ information, but something like 'Use promo code', which StoreKit handles behind the scenes). I'm afraid that doesn't work like that.
Should I handle it somehow in the AppDelegate - if there's a transaction coming right after the app launches (meaning that someone used promo code)? Should I present an alert telling the user he used the promo code, and unlock the functionality or add some 'gems' to his account (if it's consumables)?
EDIT: There are also these two apple developer forum topics: Few people have the same problem - no answer, Apple staff responded about where to place transactionObserver
EDIT2: Or perhaps promo codes cannot be applied to consumable products, which are used once and cannot be restored (using in-app promo codes is based on restoring I've read somewhere?)