2

I can use the receipt obtained by appStoreReceiptURL to retrieve the purchase date of non-renewing subscription. For non-renewing subscription, from the purchase date I could calculate the expiration date.

But when I try to restore using appStoreReceiptURL. I found that it returns nil on devices that did not make purchase even signing in with the same Apple ID.

Using

[[SKPaymentQueue defaultQueue] restoreCompletedTransactions];

cannot update the receipts in appStoreReceiptURL. Did I do anything wrong here? Or is it just not possible to restore the receipts this way?

Thanks

4

1 回答 1

1

您无法以您尝试的方式恢复事务,因为它们是消耗品,并且消耗品具有有限的寿命。

但是,您可以解析收据,并据此计算订阅期。

收据将在主捆绑包中,但可以使用刷新

recreq = [[SKReceiptRefreshRequest alloc] init];
        [recreq setDelegate:self];
        [recreq start];
于 2014-08-08T16:40:15.300 回答