最新、有效!苹果审核IPA内购Restore被拒解决办法
Created by shenyang-zhl
關于內購IPA審核,Apple的審核大佬會有千奇百怪的被拒方法。
本人目前遇到比較罕見的是沒有Restore恢復按鈕??這個也要管嗎?
好吧,以下是親測生效的解決辦法。
被拒原文:
?
We found that your app offers in-app purchases that can be restored but does not include a "Restore Purchases" feature to allow users to restore the previously purchased in-app purchases, as specified in the "Restoring Purchase Products" section of the In-App Purchase Programming Guide:
"Users restore transactions to maintain access to content they've already purchased. For example, when they upgrade to a new phone, they don't lose all of the items they purchased on the old phone. Include some mechanism in your app to let the user restore their purchases, such as a Restore Purchases button."
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.
如果你碰到這種被拒的郵件,請按照下列步驟
1、首先要在你內購的頁面上添加一個按鈕,按鈕名稱設置為【恢復購買】
2、按鈕點擊事件設置成為
- (IBAction)buttonRestoreClick:(id)sender {//xib 連接實現的方法[[SKPaymentQueue defaultQueue] restoreCompletedTransactions];//(關鍵)}2、在當前的控制器或者視圖初始化方法中(viewDidLoad)添加
- (void)viewDidLoad {[super viewDidLoad];//添加監聽方法,self是當前的控制器[[SKPaymentQueue defaultQueue] addTransactionObserver:self];}同時當前類中引入
#import <StoreKit/StoreKit.h>3、實現必須的代理方法
- (void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue NS_AVAILABLE(10_7, 3_0){[@"沒有找到可恢復后買項" ?toast];}在上面的代理方法中實現恢復購買的邏輯。如果沒有的話,那么直接彈窗"沒有找到可恢復后買項"也是可以的。如果需要真正的Restore恢復購買的話,需要在queue.transactions找到相關恢復購買。
以上3步之后,重新打包,等待審核,官方上架親測有效。
智慧流-用科技成就中小學生!
總結
以上是生活随笔為你收集整理的最新、有效!苹果审核IPA内购Restore被拒解决办法的全部內容,希望文章能夠幫你解決所遇到的問題。