Goals
- To allow users to purchase extra workout definitions in 7MW.
- To make Afterburner available to users with an active subscription only.
Requirements
The IAP system we implement must be flexible enough to allow the following:
- Allow the addition of other apps in the future that can use the same server-side data store.
- Allow the easy addition of an Android client at a later date.
- Allow us to sell workout definitions in 7MW as non-consumable IAPs.
- Allow us to sell and manage auto-renewable subscriptions for Afterburner.
- Allow users to restore previous purchases.
- Ensure that a subscription cannot be used to unlock content for multiple users.
Implementation
All IAP receipts are validated on the server, using Apple's server-to-server validation API.
- The IAP is purchased on the user's device as usual.
- The client posts the purchase receipt to /receipts/user_id/new_auto_id
- The server will then pick this up and process it.
- If the receipt is valid, the server will make the necessary changes to other parts of the FRD
- The client receives the changes through existing listeners.