I'm developing an ios Application with IAP feature. It works well. But I encountered a strange issue today. It always show me a message to ask me to "Sign In to iTunes Store" for some reasons. Here is the screenshot:
It always shows this every time when I start the application or resume from background. It even still shows this after I delete and reinstall the application. When I setup breakpoints in my source code. There is no any transaction,payment delegate callbacks. Can anybody tell me what the reason is ? Could it be the problem of Apple IAP Sandbox? (I run the same application in other devices without any problem. I can purchase, restore in Sandbox.)
Answer: A: A request for another Apple ID password is often caused by updates to apps/purchases that were made when using the other ID. Those purchases are tied to the other ID and can't be transferred. One option is to delete the apps/purchases made by the other ID and download them using the new ID if desired.
I've had this problem too a couple of times, it turned out I was stopping processing of transactions before calling finishTransaction on all queued transactions. I was forgetting to finish failed transactions in the particular case.
So, you could try letting your application run once and call finishTransaction for each and every one in your observer delegate like this:
-(void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
{
foreach(SKPaymentTransaction *tr in transactions) [queue finishTransaction:tr];
}
i.e. finish every transaction irrespective of transaction state. After the test run revert to your original handling code.
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With