i am doing one application.In that i am calling the restoreCompletedTransactions method like below.
-(void)restore
{
[SKPaymentQueue defaultqueue] restoreCOmpletedTransactions];
}
But it will not give any response from apple.If id like below then app is crashing when i call the restore method.
-(void)restore
{
[[SKPaymentQueue defaultQueue] addTransactionObserver:self];
[SKPaymentQueue defaultqueue] restoreCOmpletedTransactions];
}
So how to call the restoreCompletedTransactions.And when we use this [[SKPaymentQueue defaultQueue] addTransactionObserver:self] in my code.
[[SKPaymentQueue defaultQueue] addTransactionObserver:self];
in your app delegate. It is recommended to call it in AppDidFinishLaunching
. [SKPaymentQueue defaultqueue] restoreCOmpletedTransactions];
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.