Home > AI > IOS > StoreKit >

In‑App Purchase

Payment Methods

typedescriptionexample
ConsumableUsers can purchase different types of consumables, such as lives or gems in a game, to further their progress through an app. Consumable in‑app purchases are used once, are depleted, and can be purchased again.Coins
Non‑ConsumableUsers can purchase non‑consumable, premium features within an app. Non‑consumables are purchased once and do not expire, such as additional filters in a photo app. Apple can host content associated with your non‑consumable in‑app purchases.Remove Ads
Auto‑Renewable SubscriptionsUsers can purchase access to services or periodically updated content, such as monthly access to cloud storage or a weekly subscription to a magazine. Users are charged on a recurring basis until they decide to cancel.Buy Contents
Membership
VIP
Non‑Renewing SubscriptionsUsers can purchase access to services or content for a limited duration, such as a season pass to streaming content. This type of subscription does not renew automatically, so users need to renew each time.

Start oberserving the payment queue in the very beginning

private func startObservingPaymentQueue() {
    SKPaymentQueue.default().add(self)
}
  • Promoted in-app purchases
  • Background subscription renewals
  • Interrupted purchases

Configurate IAP

StepsConfigrations
1Configure in-app purchases in App Store Connect
2Create a sandbox test user account in the App Store Connect. See for details.
3Open the ProductIds.plist file in the sample and update its content with your existing in-app purchases’ product IDs.
4Lets Xcode Signing&Capability supports IAP
5Submit the IAP
You need screenshot exactly the size of 640X920 (iOS)
6Apple Server Notification
configurating IAP

Functions need to realize in IAP

FunctionInstruction
Configure IAP
Show the list of product identifiers fetched from App Store Connect
Purchase one item
Restore purchases
Send the receipt to the server
Test (in Xcode, Sandbord, Auto)
functions need to realize in IAP

Receipt validation

on-device

Choosing a Receipt Validation Technique

Leave a Reply