Fix subscription state not updating after purchase or cancellation
- Add force parameter to checkSubscriptionStatus to bypass 5-minute throttle when called from transaction listener, purchase completion, and restore purchases - Remove early return for expired/revoked states that prevented fallback to trial - Only trust cached subscription expiration when offline (products failed to load); when StoreKit returns products successfully, treat the live entitlement check as authoritative - Add debug logging throughout IAP state machine for diagnostics Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -71,7 +71,7 @@ struct ReflectSubscriptionStoreView: View {
|
||||
case .success(.success(_)):
|
||||
AnalyticsManager.shared.trackPurchaseCompleted(productId: product.id, source: source)
|
||||
Task { @MainActor in
|
||||
await iapManager.checkSubscriptionStatus()
|
||||
await iapManager.checkSubscriptionStatus(force: true)
|
||||
iapManager.trackSubscriptionAnalytics(source: "purchase_success")
|
||||
}
|
||||
dismiss()
|
||||
|
||||
Reference in New Issue
Block a user