最新、有效!苹果审核IPA内购Restore被拒解决办法

本文分享了iOS应用内购功能在Apple审核中因缺少“恢复购买”按钮而被拒的解决办法。通过添加按钮并实现相应逻辑,确保用户能够恢复已购商品,顺利通过审核。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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步之后,重新打包,等待审核,官方上架亲测有效。

智慧流-用科技成就中小学生!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值