I need to achieve items of details about Product.SubscriptionInfo.RenewalInfo.
How one can get to the renewalInfo knowledge in Swift?
I attempted this code:
let standing: [Product.SubscriptionInfo.Status]? = strive await merchandise[sku]?.subscription?.standing
if let statusArr = merchandise[sku]?.subscription?.standing {
for merchandise in statusArr {
if let verificationResult = merchandise.renewalInfo as? VerificationResult<Product.SubscriptionInfo.RenewalInfo> {
let renewalInfo = verificationResult.payloadValue
let state = renewalInfo.state
print("state: (state)")
let expirationReason = renewalInfo.expirationReason
print("expirationReason: (expirationReason)")
let jsonRepresentation = renewalInfo.jsonRepresentation
print("jsonRepresentation: (jsonRepresentation)")
}else{
print("no data")
}
}
}
However I get this error:
Worth of kind 'Product.SubscriptionInfo.RenewalInfo' has no member 'state'
I am new to Swift and iOS documentation, possibly I am doing one thing fallacious or misunderstanding the idea🥴. The place might I discover any instance code?