SKPaymentQueue addTransactionObserver asking for App Store password on startup after in-app purchase

后端 未结 14 1171
耶瑟儿~
耶瑟儿~ 2020-12-01 04:46

My app is using in-app purchases, and most of my users can purchase just fine without any problems. For these folks, my app downloads the content after the purchase succeeds

14条回答
  •  北海茫月
    2020-12-01 05:38

    DO NOT DELETE THE ANSWER HERE. It was this particular Stackoverflow question that misled me and messed me up for days.

    I'm putting this here because there are a lot of really bad answers that provide WRONG information on how to resolve the problem.

    DO NOT:

    • Delete the sandbox test user. This makes it impossible to resolve the problem and you will have to contact Apple developer support to resolve manually.
    • If you delete the sandbox test user, when you are subsequently repeatedly prompted to log in as that user and complete the transaction, you can't, hence the name Endless Loop problem. Nor will you be able to add the deleted test user again; the developer portal says the user id has already been used.
    • Delete the App or re-install iOS or any other such nonsense. It has no effect, doesn't solve the problem and wastes a lot of time.

    DO:

    • Call Finish for ALL transactions.
    • If one is interrupted for some reason, simply complete on a subsequent run of the App. The app will be repeatedly sent the payment queue notice until you call finish on it:

    [[SKPaymentQueue defaultQueue] finishTransaction:transaction];

    That's it, Finish all transactions! Else you will be sent to the hell of the Endless Loop of sign in requests every single time your App launches on that device.

提交回复
热议问题