關於IAP:蘋果的審覈規則發生了一點變化--沒有“恢復”將會被拒

 最近的一個應用被拒了,蘋果解釋如下:

Reasons for Rejection:
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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章