简体   繁体   English

更新mac应用程序SwiftyStoreKit后恢复购买不起作用

[英]Restore purchase not working after updating mac app, SwiftyStoreKit

I am using SwiftyStoreKit for In-App Purchases.我正在使用 SwiftyStoreKit 进行应用内购买。 It was working fine.它工作正常。 Until I uploaded a new build, few users reporting that their Restore Purchase not working.在我上传新版本之前,很少有用户报告他们的恢复购买不起作用。 I have tested both In-App and Restore purchase in debug mode, its working fine on my side.我已经在调试模式下测试了应用内购买和恢复购买,它在我这边工作正常。 Does anyone know what could be the problem?有谁知道可能是什么问题?

I'm using macOS 10.15.2 Catalina我正在使用 macOS 10.15.2 Catalina

After trying different ways, I finally resolved my issue.在尝试了不同的方法后,我终于解决了我的问题。 In AppDelegate Class method applicationDidFinishLaunching , I wrote these 2 lines at start:AppDelegate Class 方法applicationDidFinishLaunching中,我在开始时写了这两行:

    let receiptRefreshRequest = SKReceiptRefreshRequest()
    receiptRefreshRequest.start()

After starting this receipt refresh request, restore purchase successfully started working.启动此收据刷新请求后,恢复购买成功开始工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM