WatchOS Auto-Renewing Subscriptions

I'm creating a standalone WatchOS app using StoreKit 2. The code I have for making the purchase and checking the subscription status works under iOS 15. On WatchOS 8, after confirming the purchase, the product.subscription.status array is empty. I'm testing using the Xcode sandbox and I can see the purchase transaction there. I've talked with an Apple engineer and they think it may be a bug in WatchOS, but I'm reaching out here to see if anyone else has encountered this issue.

Here's a code snippet:

guard let product = store.subscriptions.first else { print("No Subscriptions"); return }
guard let sub = product.subscription else { print("Not Subscription",product.id); return }
let statuses = try await sub.status

After the purchase, statuses has a value on iOS 15, but it's empty on WatchOS 8.

"store" is my object to deal with StoreKit. Here's some relevant code that populates the store.subscriptions array.

class Store: ObservableObject {
  @Published private(set) var subscriptions: [Product]

  @MainActor
  func requestProducts() async {
    do {
      //...  keys are my product identifiers
      let storeProducts = try await Product.products(for: keys)
      for product in storeProducts {
        switch product.type {
        // [snip]
        case .autoRenewable:
          newSubscriptions.append(product)
        }
      }
      subscriptions = sortByPrice(newSubscriptions)
    }
    // [snip]
  }
}

I have tested this with Xcode 13.1 and 13.2b2.

  • I am also having the same problem. XCode 13.2.1, watchOS 8.3

    It works normally in iOS and macOS, but the "status" value is empty in watchOS. This issue is the same on the simulator and the device.

Add a Comment

Replies

We are taking a look but in the meantime can you provide this detail, a sysdiagnose and any other attachments, logs, etc. to a ticket at FeedbackAssistant.Apple.com? once filed, please post the FB# here to track. Thank you

  • Thanks for the quick reply. I'll be working on that. Any tips on creating a sysdiagnose for an Apple Watch?

Add a Comment