CurrentApp.LicenseInformation只允许我访问一次

本文关键字:一次 访问 LicenseInformation 允许我 CurrentApp | 更新日期: 2023-09-27 18:16:45

我在呼叫CurrentApp.LicenseInformation时遇到问题,第一次呼叫通过,但如果我关闭应用程序并再次打开下一个呼叫锁定应用程序并关闭。但是,如果我等待5-10分钟并再次打开它,我可以再次访问它,一次。

这是我在调用时所使用的方法:

public bool HasPurchasedPlus()
{
    var licenseInformation = CurrentApp.LicenseInformation;
    var iap1 = licenseInformation.ProductLicenses["Package1"].IsActive;
    var iap2 = licenseInformation.ProductLicenses["Package2"].IsActive;
    return iap1 || iap2;
}

如果能帮助解决这个问题,我将不胜感激。谢谢。

CurrentApp.LicenseInformation只允许我访问一次

系统更新后,这个问题就消失了。我不能肯定地说这是操作系统的问题,但目前看来,这是由于从系统读取数据的问题,因为它也影响了读取文件。