最近的一个应用被拒了,苹果解释如下:
|
大体意思就是应用需要一个购买恢复的功能,第一次做的IAP并没有做这个功能,但也通过了,可能是苹果新增的审核规则。
解决方法很简单,增加一个Restore按钮,并调用[[SKPaymentQueue defaultQueue] restoreCompletedTransactions],接下来的流程是
1,弹出对话框输入帐号信息
2,如果点击“取消”,调用方法
-(void)paymentQueue:(SKPaymentQueue *)queue restoreCompletedTransactionsFailedWithError:(NSError *)error
如果点击“确定”,开始请求数据
3,返回数据后,回调
-(void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
4,判断交易队列中交易的状态,在状态为“SKPaymentTransactionStateRestored”的switch分支下调用恢复处理方法
5,恢复完成后回调-(void)completeTransaction:(SKPaymentTransaction *)transaction