加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

objective-c – 在应用程序购买中没有还原按钮导致拒绝

发布时间:2020-12-15 02:04:41 所属栏目:百科 来源:网络整理
导读:我正在使用应用程序购买非消耗品项目,被苹果拒绝,原因是: We found that your app offers In-App Purchase/s that can be restored but it does not include a “Restore” feature to allow users to restore the previously purchased In-App Purchase/
我正在使用应用程序购买非消耗品项目,被苹果拒绝,原因是:

We found that your app offers In-App Purchase/s that can be restored but it does not include a “Restore” feature to allow users to restore the previously purchased In-App Purchase/s.

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.

For more information about restoring transactions and verifying store receipts,please refer to the

并没有链接参考,我已经实施了:

– (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)事务


SKPaymentTransactionStateRestored案例。

但我没有实现:

`restoreCompletedTransactions`  or `paymentQueueRestoreCompletedTransactionsFinished`

应用程序购买是否需要批准这些方法,或者确切的问题是什么。

谢谢

解决方法

使用以下功能恢复用户从您的应用程序购买的产品ID

- (void) checkPurchasedItems
{
   [[SKPaymentQueue defaultQueue] restoreCompletedTransactions];
}// Call This Function

//Then this delegate Function Will be fired
- (void) paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue
{
  purchasedItemIDs = [[NSMutableArray alloc] init];

  NSLog(@"received restored transactions: %i",queue.transactions.count);
  for (SKPaymentTransaction *transaction in queue.transactions)
  {
      NSString *productID = transaction.payment.productIdentifier;
      [purchasedItemIDs addObject:productID];
  }

}

purchasedItemID将包含用户购买的所有产品ID。当您完成显示所有这些产品以使用户再次下载它时,您可以放置??一个按钮来调用此功能。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读