How to check if a Subscription is expiring or renewing in Swift?
Verify the Auto-Renewable Subscription status renewalInfo and check its willAutoRenew property.
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.
Use the snippet below to determine if a subscription is renewing or has been cancelled and will expire.
We recommend making this an extension of the StoreKit Coordinator.
Please note that the checkVerified function was created as part of our StoreKit Coordinator guide.
Looking to get the status of an Auto-Renewable Subscription?
Consult our article to learn how to determine if an Auto-Renewable Subscription is subscribed, expiring, in billing retry, in a grace period, expired or revoked.
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.