Post

Replies

Boosts

Views

Activity

Storekit 2: The subscription expired but the status is always subscribed.
Hello everyone, I'm trying to use Storekit 2 for my application. But I have an issue when checking the expired date. I cancelled the subscription in the setting (Sandbox). After few minutes, the subscription was expired (stop to renew). It's OK. But after I open my app, the status of the subscription still "Subscribed" although the expiredDate was expired. Why the status wouldn't be "Expired"? func updateSubscriptionStatus() async {     do {       guard let product = subscriptions.first,          let statuses = try await product.subscription?.status else {         return       }       for status in statuses {         switch status.state {         case .subscribed:           print("Always enter this case with expired date.")         case .expired:           print("Never enter this case.")         case .revoked:           break         case .inGracePeriod:           break         case .inBillingRetryPeriod:           break         default:           break         }       }     } catch {            }   }
3
0
2.2k
Mar ’22