Note that there are some explanatory texts on larger screens.

plurals
  1. POSKPaymentQueue addTransactionObserver asking for App Store password on startup after in-app purchase
    text
    copied!<p>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 and they are happy.</p> <p>However, for a growing number of my users, once they complete a successful in-app purchase they are being asked for their App Store password every time the app starts up after that. I believe this is happening on the call to:</p> <pre><code>[[SKPaymentQueue defaultQueue] addTransactionObserver:observer]; </code></pre> <p>which I am calling on startup in accordance with step 6 in Apple's in-app purchase guide:</p> <ul> <li>archived guide: <a href="https://web.archive.org/web/20130515222703/https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/StoreKitGuide/AddingaStoretoYourApplication/AddingaStoretoYourApplication.html" rel="nofollow noreferrer">https://web.archive.org/web/20130515222703/https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/StoreKitGuide/AddingaStoretoYourApplication/AddingaStoretoYourApplication.html</a></li> <li>actual guide: <a href="https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/DeliverProduct.html#//apple_ref/doc/uid/TP40008267-CH5-SW4" rel="nofollow noreferrer">https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/DeliverProduct.html#//apple_ref/doc/uid/TP40008267-CH5-SW4</a></li> </ul> <p>My guess is that, for some reason, Apple's in-app purchase servers aren't registering that the transaction finished successfully - even though I call</p> <pre><code>[[SKPaymentQueue defaultQueue] finishTransaction:transaction]; </code></pre> <p>when the transaction is completed and my content has been successfully downloaded.</p> <p>2 questions:</p> <ol> <li><p>Is anyone else seeing this?</p></li> <li><p>Does anyone have a suggested fix?</p></li> </ol> <p><strong>BOUNTY EDIT</strong>:</p> <p>Its a transaction which was made with a different Apple-ID. Thats why it cannot be finished unless you type in the right credentials into the dialog. The Question should be either: </p> <ol> <li>How can I prevent such dead transactions (transaction has not been finished, user has no network, meanwhile changes App-ID)?</li> <li>How can you prune the <code>SkPaymentQueue</code>? </li> </ol>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload