简体   繁体   中英

Give free consumable in app products after user purchases premium version upgrade (non consumable)

I currently have in-app purchase implemented in my app allowing the user to upgrade to the premium version which unlocks almost all of the apps features. When the user upgrades to the premium version, I am also wanting to give them two free tokens so they can use them to unlock any 2 of the 20 or so emoji packets that my app includes. What is the best way to accomplish this?

I found out that the only real way to accomplish this is to use the keychain to store the two tokens after the user makes the purchase. After the user uses a token, have them download the product for free from the app store via the in app purchase SDK.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM