Version 6.4.6 - iOS Expired Subscriptions Fix
· One min read
We're releasing version 6.4.6 to fix an important issue with retrieving expired subscriptions in iOS sandbox environment.
Version Information
- Current Version: 6.4.6
- Previous Stable: 6.4.5
Bug Fix
iOS Expired Subscriptions in Sandbox
Fixed issue #543 where getPurchaseHistories()
couldn't retrieve expired subscription records in StoreKit 2 sandbox environment.
Root Cause:
- iOS was using
Transaction.currentEntitlements
which only returns active/valid purchases - Changed to use
Transaction.all
when expired subscriptions need to be included
API Enhancement
PurchaseOptions for getAvailablePurchases
Added PurchaseOptions
parameter to getAvailablePurchases()
for OpenIAP compliance:
// Get all purchases including expired subscriptions
final purchases = await FlutterInappPurchase.instance.getAvailablePurchases(
PurchaseOptions(
onlyIncludeActiveItemsIOS: false, // Include expired subscriptions
),
);
Deprecation Notice
getPurchaseHistories()
is now deprecated and will be removed in v7.0.0. Use getAvailablePurchases()
with PurchaseOptions
instead.
Migration Guide
// Before
final history = await iap.getPurchaseHistories();
// After
final history = await iap.getAvailablePurchases(
PurchaseOptions(
onlyIncludeActiveItemsIOS: false,
),
);
This fix ensures iOS developers can properly test subscription lifecycle in sandbox environments.