使用 in_app_purchase: ^0.3.5+1 包,我正在尝试验证用户在 iOS 上是否有活动订阅。
我可以得到productID
and transactionDate
, with purchaseDetails.productID & purchaseDetails.transactionDate
。但我似乎无法获得到期日期或状态。观看他们谈论“状态”堆的苹果视频。我不确定是否有人开始免费的 3 天试用,如果交易日期会知道他们是否取消,所以没有信心将所有事情都基于此交易日期。
我可以得到purchaseDetails.verificationData.localVerificationData
,这似乎是一个 ANS1 字符串,这可能有更多信息,但我似乎无法解码它。有谁现在如何为 iOS 解码这个?或者知道另一种获取订阅状态的方法?
我试图不使用像 RevenueCat 这样的平台(因为他们削减了),但他们似乎提供了这样的功能。
下面是 ASN.1 字符串:
MIIbiQYJKoZIhvcNAQcCoIIbejCCG3YCAQExCzAJBgUrDgMCGgUAMIILKgYJKoZI
hvcNAQcBoIILGwSCCxcxggsTMAoCAQgCAQEEAhYAMAoCARQCAQEEAgwAMAsCAQEC
AQEEAwIBADALAgEDAgEBBAMMATMwCwIBCwIBAQQDAgEAMAsCAQ8CAQEEAwIBADAL
AgEQAgEBBAMCAQAwCwIBGQIBAQQDAgEDMAwCAQoCAQEEBBYCNCswDAIBDgIBAQQE
AgIAyzANAgENAgEBBAUCAwIjqDANAgETAgEBBAUMAzEuMDAOAgEJAgEBBAYCBFAy
NTYwGAIBBAIBAgQQ/UG8mQyNEnmF2PQy51nhPDAbAgEAAgEBBBMMEVByb2R1Y3Rp
b25TYW5kYm94MBsCAQICAQEEEwwRbWlsa2kuZm9jdXMudGltZXIwHAIBBQIBAQQU
j88VIyoRl7su71RrYMoWKY/VmoMwHgIBDAIBAQQWFhQyMDIxLTAxLTA5VDEzOjEz
OjM4WjAeAgESAgEBBBYWFDIwMTMtMDgtMDFUMDc6MDA6MDBaMEICAQcCAQEEOqon
CJy6w5atxqYbNoBJJa3W9WB6qVDijWLZvtDp4yolmsIVkHghqERYsDDj/FUfM9sN
eHQNEYbz8mowTQIBBgIBAQRF4nUjxdFAA0i0vWAK9OR1Y9990SU5jby3UYE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