Post

Replies

Boosts

Views

Activity

Reply to Transaction.currentEntitlements is not consistent
In my experience, it's entirely unreliable. I have employed a combination of the StoreKit API (async update streams from your example) and the SwiftUI modifiers (.currentEntitleTask(for: ProductId)) to manage the state of just a single subscription and even that's not enough. I can refund a subscription and it won't register on the update stream. Then I'll re-run the app and I can no longer re-subscribe because the updates don't come through at all. Deleting transactions does nothing at all. This is just local dev with Xcode and the StoreKit Transaction Manager. I have no idea what the production experience would be like. Apple's examples exhibit the same issues. Every third party tutorial on the internet (including the one you seem to have drawn inspiration from) exhibits the same issues. I have no idea how anyone properly implements in-app purchases without bugs. It seems impossible. All I want is something like this: StoreKit .forDummies .activeSubscriptionsPublisher .map(\.productID) .assign(to: &$activeSubscriptionProductIds) 😭
May ’24