最新、有效!苹果审核IPA内购Restore被拒解决办法
Created by shenyang-zhl
關(guān)于內(nèi)購(gòu)IPA審核,Apple的審核大佬會(huì)有千奇百怪的被拒方法。
本人目前遇到比較罕見的是沒有Restore恢復(fù)按鈕??這個(gè)也要管嗎?
好吧,以下是親測(cè)生效的解決辦法。
被拒原文:
?
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.
如果你碰到這種被拒的郵件,請(qǐng)按照下列步驟
1、首先要在你內(nèi)購(gòu)的頁(yè)面上添加一個(gè)按鈕,按鈕名稱設(shè)置為【恢復(fù)購(gòu)買】
2、按鈕點(diǎn)擊事件設(shè)置成為
- (IBAction)buttonRestoreClick:(id)sender {//xib 連接實(shí)現(xiàn)的方法[[SKPaymentQueue defaultQueue] restoreCompletedTransactions];//(關(guān)鍵)}2、在當(dāng)前的控制器或者視圖初始化方法中(viewDidLoad)添加
- (void)viewDidLoad {[super viewDidLoad];//添加監(jiān)聽方法,self是當(dāng)前的控制器[[SKPaymentQueue defaultQueue] addTransactionObserver:self];}同時(shí)當(dāng)前類中引入
#import <StoreKit/StoreKit.h>3、實(shí)現(xiàn)必須的代理方法
- (void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue NS_AVAILABLE(10_7, 3_0){[@"沒有找到可恢復(fù)后買項(xiàng)" ?toast];}在上面的代理方法中實(shí)現(xiàn)恢復(fù)購(gòu)買的邏輯。如果沒有的話,那么直接彈窗"沒有找到可恢復(fù)后買項(xiàng)"也是可以的。如果需要真正的Restore恢復(fù)購(gòu)買的話,需要在queue.transactions找到相關(guān)恢復(fù)購(gòu)買。
以上3步之后,重新打包,等待審核,官方上架親測(cè)有效。
智慧流-用科技成就中小學(xué)生!
總結(jié)
以上是生活随笔為你收集整理的最新、有效!苹果审核IPA内购Restore被拒解决办法的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。