The docs for Transaction.updates
say:
Use updates to receive new transactions while the app is running. This sequence receives transactions that occur outside of the app, such as Ask to Buy transactions, subscription offer code redemptions, and purchases that customers make in the App Store. It also emits transactions that customers complete in your app on another device.
Note that after a successful in-app purchase on the same device, StoreKit returns the transaction through Product.PurchaseResult.success(_:).
So Transaction.updates
isn't supposed to include transactions for purchases that are made in this instance of the app, right? I have this code to get those transactions:
SubscriptionStoreView(groupID: group_id) {
}
.onInAppPurchaseCompletion() { product, result in
.....
}
But when I make a purchase using this SubscriptionStoreView, I see that both this .onInAppPurchaseCompletion
code and my code observing Transaction.updates is called.
Is this expected? Will it work reliably without the .onInAppPurchaseCompletion
?
Thanks.