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 {
      
    }
  }

Please file a ticket at http://feedbackassistant.apple.com with a sysdiagnose and as much detail as you can. Feel free to reply here with the FB#.

I'm seeing this happen while testing with the Xcode Transactions Manager and using a StoreKit configuration file. Does this bug only affect this test environment or do we know if it's working fine in prod?

I have the same issue. Did you investigate this further ? Is only sandbox affected by this ?

Storekit 2: The subscription expired but the status is always subscribed.
 
 
Q