Open tzgd opened 2 months ago
`open func purchase( _ product: Product, uid: String ) async throws -> Product.PurchaseResult {
throw StoreServiceError.unsupportedPlatform("This purchase operation is not supported in visionOS: Use @Environment(\\.purchase) instead.")
#else
let uuid = Product.PurchaseOption.appAccountToken(UUID.init(uuidString: uid)!)
let result = try await product.purchase(options: [uuid])
switch result {
case .success(let result): try await handleTransaction(result)
case .pending: break
case .userCancelled: break
@unknown default: break
}
return result
#endif
}`
You can add a method to add uid, the code is only for reference, and you can improve it when you are free
That's perfect, I'll make it happen.
I can take a look, or will happily merge any PR that adds this feature 👍