The very first thing I do is to register the observer.
Then I send a
SKProductsRequest and get the products.
paymentQueueRestoreCompletedTransactionsFinished and by that confirms the observer is setup correctly.
But when I now try to make a payment with either
let payment = SKMutablePayment() payment.productIdentifier = productIdentifier SKPaymentQueue.default().add(payment)
not a single of the
SKPaymentTransactionObserver functions is being called, nor does the user get asked to confirm the purchase or login. I see no error - nothing.
add transactions are queuing up (
SKPaymentQueue.default().transactions) but they do not trigger any user interaction.
This is using the sandbox. The login to purchase dialog has popped up exactly once. After the login I got a failure that I need to switch AppStore territories. No idea how to do that - but one issue at a time.
Anyone got an explanation for this behaviour?
not a single of the SKPaymentTransactionObserver functions is being called. I see no error - nothing.
That is expected behavior. After adding a payment, you don't get an event until the user does something, like purchases. But you are not purchasing because, as you have said, nothing further happens at all (perhaps because you have some sort of issue to iron out with the app store territory).
SKPaymentQueue.default().add(payment)should not get ignored. Period.
I am not sure what happened on my machine but after a reboot things started to behave. The sign-in dialog appeared reliably and for some weird reason canceling it automatically switched territories and everything started to work. Not getting a dialog or error seems worth opening a radar for - but since I can no longer reproduce it I just leave this here for others to find when running into the same problem.
I am still after the information of actively switching the territory if anyone happens to know.