In Apple official example code "Backyard Birds", is this code wrong? For I've tested this code many times but this part has never been executed!
.onInAppPurchaseCompletion { _, purchaseResult in
guard case .success(let verificationResult) = purchaseResult,
case .success(_) = verificationResult else {
return
}
showingSubscriptionStore = false
}
This modifier decorate code as below
.sheet(isPresented: $showingSubscriptionStore) {
SubscriptionStoreView(groupID: groupID)
}
Is it because the modifier onInAppPurchaseCompletion
only works with ProductView
?