`
445822357
  • 浏览: 736558 次
文章分类
社区版块
存档分类
最新评论

关于IAP:苹果的审核规则发生了一点变化--没有“恢复”将会被拒

 
阅读更多

原文链接:http://hillboy.blog.51cto.com/1645730/946243

最近的一个应用被拒了,苹果解释如下:

Jul 25, 2012 12:52 PM. From Apple.
We found that while your app offers In-App Purchase(s) that can be restored, it does not include the required "Restore" feature to allow users to restore the previously purchased In-App Purchase(s), as specified in Restoring Transactions section of the In-App Purchase Programming Guide:

"...if your application supports product types that must be restorable, you must include an interface that allows users to restore these purchases. This interface allows a user to add the product to other devices or, if the original device was wiped, to restore the transaction on the original device."

To restore previously purchased In-App Purchase products, it would be appropriate to provide a "Restore" button and initiate the restore process when the "Restore" button is tapped by the user.

For more information about restoring transactions and verifying store receipt, please refer to the In-App Purchase Programming Guide.
大体意思就是应用需要一个购买恢复的功能,第一次做的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

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics