zino
zino

Reputation: 1472

Xcode StoreKit Subscription Dialog, how to accept?

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()

enter image description here

I am using Xcode Version 16.1

Possibly related: https://forums.developer.apple.com/forums/thread/774079

Upvotes: 1

Views: 95

Answers (0)

Related Questions