Cancel event for [[SKPaymentQueue defaultQueue] restoreCompletedTransactions]

∥☆過路亽.° 提交于 2019-12-06 03:27:37

问题


Apple released the StoreKit and we cannot even get any callbacks for the cancel event when a user puts in his/her email and password for:

[[SKPaymentQueue defaultQueue] restoreCompletedTransactions]

This event should not be confused with pushing cancel when cancelling a purchase.

The event we're interested in is pushing cancel when trying to restore transactions.

There are no callbacks for a user pushing cancel, or even pushing the OK button.

The only call back you get is when the information from the server comes back indicating if it was successful or not. Unacceptable.


回答1:


Try this one:

@protocol SKPaymentTransactionObserver <NSObject>

....

@optional

// Sent when an error is encountered while adding transactions from the user's purchase history back to the queue.
- (void)paymentQueue:(SKPaymentQueue *)queue restoreCompletedTransactionsFailedWithError:(NSError *)error __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0);


@end


来源:https://stackoverflow.com/questions/3365947/cancel-event-for-skpaymentqueue-defaultqueue-restorecompletedtransactions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!