Reputation: 1472
I have a macOS app where I am testing the in app subscription purchase using Xcode.
When I trigger the purchase using this code, a dialog is shown in the upper right of my screen, which cannot be moved and just has a "cancel" button. How can I accept the test purchase?
// Fetch available products from App Store
let products = try await Product.products(for: [product_id])
// Ensure product exists
guard let product = products.first else {
print("Product not found")
return
}
// Trigger Apple’s purchase sheet
let result = try await product.purchase()
I am using Xcode Version 16.1
Possibly related: https://forums.developer.apple.com/forums/thread/774079
Upvotes: 1
Views: 95