in-app purchase Sandbox Environment loop

前端 未结 2 1861
隐瞒了意图╮
隐瞒了意图╮ 2020-12-09 16:59

I have in-app purchases working in my production app, and I\'m adding a new item for sale.

However, I can not test a new in-app purchase in the sandbox environment.

相关标签:
2条回答
  • 2020-12-09 17:44

    I was having this problem for a while as well, but for me the solution was something else: I kept getting that prompt, but also all of my SKPaymentTransactions from previous test session kept re-apparing in this method:

    paymentQueue:updatedTransactions:.

    Some were completing (and messing up my local purchasing record) and some were failing over and over again. This was because in my code to receive those transitions in the method above, once I processed the completed or failed transaction I was not calling:

    [[SKPaymentQueue defaultQueue] finishTransaction:transaction];.

    Which removes them from the payment queue. The transactions were just trying to finish, and hence the prompt and my messed up local purchase record.

    Hope this helps! :)

    0 讨论(0)
  • 2020-12-09 17:54

    OK. I've figured this out. It was my test account. Since I was taking the account and logging in through Settings->App Store, I was registering each with credit card and email notification. I used an old account that created before but hadn't "activated", and it worked. So, the key was to not log in through the Settings->Store - stay logged out. And then log in with a test account that was only created on iTunes Connect, but never activated.

    0 讨论(0)
提交回复
热议问题