How to determine if an introductory offer has been used in Swift?
To determine if an Auto-Renewable Subscription Introductory Offer has been used before, check if a customers transaction history includes the subscription.
The guide was made using our Free iOS StoreKit 2 Open Source project which is recommended for developers or business folk wishing to learn about how In-App Purchases or Subscriptions work and the code behind them.
In your project, add the code below.
We recommend that you add this to the StoreKitCoordinator in an extension file called StoreKitCoordinator+IntroductoryOffer.swift.
Please note that the checkVerified function was created as part of our StoreKit Coordinator guide.
Looking to learn more about developing apps with StoreKit 2?
Read our comprehensive development guide linked below to learn about all the secrets behind developing In-App Purchases and Subscriptions with StoreKit 2.