- Consumable
- For comumable items like , currency in a game.
- Non-Consumable
- Purchase once and keep forever, eg : remove add from a free game
- Auto-Renewable Subscription
- Monthly subscription based service.
- Non-Renewing Subscriptions
- Service not possible to renew, like season pass for some app.
Following items are necessary
- Real device to test
- Paid developer account
- Define purchase in iTunes
- Load all the reference name from purchanseble items in application
- Fetch product info for all of those items
- User buys product
- Process transection response
- Validate the receipt
- Uplock the content
- Finish the trancsection
- Login to your paid developer account from Apple (https://developer.apple.com/)
- Create a new appID (Certificates, Identifiers & Profiles > Identifiers > App IDs)
- Now login to (https://appstoreconnect.apple.com/)
- Create an app (My App > + > new app)
- Now login to (https://appstoreconnect.apple.com/)
- Go to myapp and select your app
- Click Feature > In-App Purchases > Click + sign > Any of the subscriptions type Note : Product ID have to be unique (Eg: Bundle ID + Extra)
- Now login to (https://appstoreconnect.apple.com/)
- Go to Users and Access tab
- Click Testers under Sandbox group
- Create a sandbox account with necessary informations (the email address should be and paid/unpaid apple id)
- Check your email to verify the id
- Configure the bundle identifier (Create a XCode project and ensure your have same build id which you have used in developer.apple.com )
- Enable in app purchases in the capabilities tab