As per ios sdk documentation:
let customer = CBCustomer(customerID: "Test123",firstName: "CB",lastName: "Test",email: "cbTest@chargebee.com")
CBPurchase.shared.restorePurchases(includeInActiveProducts: true, customer: customer) { result in
switch result {
case .success(let response):
for subscription in response {
if subscription.storeStatus.rawValue == StoreStatus.Active.rawValue{
print("Successfully restored purchases")
}
}
case .failure(let error):
// Handle error here
print("Error:",error)
}
}
The ios sdk requires a customer, but the flutter sdk doesn't. How is that possible?? If we call this function without a customer, which customer is the subscription restored to?