expireSubscription(productIdentifier:)
Causes the identified auto-renewable subscription to expire immediately in the test environment.
Declaration
func expireSubscription(productIdentifier: String) throwsParameters
- productIdentifier:
The Productidentifier of the auto-renewable subscription to expire.
Discussion
Use this method to test how your app handles expired subscriptions and revoking access to content or service. This method forces the subscription to expire. Specifically, the testing environment disables auto-renew and changes the subscription’s expiration date to the current system time.
You can also test subscription expiration by accelerating the time in the testing environment to speed up subscription renewal periods. See timeRate for more information.