When I tried to restore a lifetime access IAP on iOS with this code it did not detect a purchase. It seems to only work with subscriptions. Am I doing something wrong, or is there a different method to detect if a user has purchased a lifetime access IAP? Tried looking through docs but didn’t come across anything. Thanks for any help in advance.
Purchases.shared.restorePurchases { (customerInfo, error) in
//Check customerInfo to see if entitlement is active
attemptingRestorePurchase = true // Bool that starts loading indicator
if customerInfo?.entitlements.allmConstants.entitlementID]?.isActive == true {
paidCustomer = true //Mark user as paid
attemptingRestorePurchase = false //stop loading indicator
} else {
if networkMonitor.isConnected { // Alert toggle - checks internet connection
attemptingRestorePurchase = false // stop loading indicator
restorePurchaseError.toggle() // Alert toggle - Restore not successful
} else {
attemptingRestorePurchase = false // stop loading indicator
noInternetAlert.toggle() // Alert toggle - No internet connection
}
}
}