更改沙箱帐户后,Apple IAP还原数据将发送相同的收据

时间:2018-07-20 11:22:30

标签: ios swift in-app-purchase

我正在使用IAP Auto可再生订阅。在更改了沙箱帐户后,我正在使用一个沙箱帐户进行测试,但是为了进行收据验证,我仍然获得相同的收据。

PS:我也尝试过

// Hint... handle requestDidFinish delegate method and then use appStoreReceiptURL for receipt data
let request:SKReceiptRefreshRequest = SKReceiptRefreshRequest(receiptProperties: nil);
request.delegate  = self;
request.start();

但是它一直在询问iTunes密码,这很烦人。

1 个答案:

答案 0 :(得分:2)

在访问appStoreReceiptURL之前尝试调用SKReceiptRefreshRequest; https://developer.apple.com/documentation/storekit/skreceiptrefreshrequest

// Hint... handle requestDidFinish delegate method and then use appStoreReceiptURL for receipt data
let request:SKReceiptRefreshRequest = SKReceiptRefreshRequest(receiptProperties: nil);
request.delegate  = self;
request.start();