billingGracePeriodIsEnabled
A Boolean value that indicates whether the test environment simulates a billing grace period for auto-renewable subscriptions.
Declaration
var billingGracePeriodIsEnabled: Bool { get set }Discussion
The default value is false. The value of this property has no effect when shouldEnterBillingRetryOnRenewal is false.
In the production environment, you indicate whether your app supports a billing grace period by setting it in App Store Connect. In the testing environment, you indicate that your app supports it by setting the billingGracePeriodIsEnabled property to true.
To test how your app handles a grace period when a subscription enters a billing retry state, enable shouldEnterBillingRetryOnRenewal and billingGracePeriodIsEnabled. All subscriptions fail to renew with a simulated billing issue until you set shouldEnterBillingRetryOnRenewal to false. To resolve a billing issue in the testing environment, call resolveIssueForTransaction(identifier:).
For more information about billing grace periods and enabling them in the production environment, see Reducing Involuntary Subscriber Churn and Enable billing grace period for auto-renewable subscriptions.
Changing this property overrides its setting in the StoreKit configuration file for this test session. Call resetToDefaultState() to revert all settings to those in the configuration file.