1

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

2

1 Answer 1

0

If anyone else has this issue, it seems to be caused by not having any active windows of your own app open.

So the payment dialog tries to centre on the menu icon in the corner, and also hides the Subscribe button for some reason.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.