I have recently released my first app after 2.5 years of development (a roguelike) and I am now having difficulty restoring a nonconsumable purchase:
I have a "restore purchases" button that calls this method just fine:
[[SKPaymentQueue defaultQueue] restoreCompletedTransactions];
Then a prompt pops up requesting my user name and password, so I enter my test account information.
However, that is all that happens. The app doesn't crash as xcode shows it still running fine, but this method never gets called:
-(void) paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions;
I am able to make consumable purchases and even the non-consumable purchase can be made normally, but when I delete the app from my device, reinstall and try to restore, the paymentQueue: updatedTransactions: function above never gets called while everything else seems to be called normally.
Can anyone identify my error?
Are you calling [[SKPaymentQueue defaultQueue] addTransactionObserver:myObject]
to tell the defaultQueue that you are to be notified of transaction updates/events? I just recently had a similar problem occur to me, and it took a couple of days and multiple tutorials to find the error. Hope this helps!
Note that Store Kit testing does not work in the Simulator. You don't say whether this is happening in the Simulator or on a device, but my experience is that testing in the Simulator won't cut it. (It's unclear to me whether this is a deliberate policy on Apple's part or a Simulator bug.)
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