One way to login in with RevenueCat with a callback is:
guard let uid = Auth.auth().currentUser?.uid else { return }
// iOS
Purchases.configure(withAPIKey: "...myAPI_KEY...")
Purchases.shared.logIn(uid) { (customerInfo, created, error) in
if let error = error { return }
// I'm 100% sure the user is definitely logged into RevenueCat, now do something
}
// Android
Purchases.configure(PurchasesConfiguration.Builder(this, "...myAPI_KEY...").build())
Purchases.sharedInstance.logInWith(uid) { customerInfo, created ->
// I'm 100% sure the user is definitely logged into RevenueCat, now do something
}
The other option is to use these, but I can't find a callback for them:
// If WiFi is down when calling these, I'll never know that the user was never logged into RevenueCat
Purchases.configure(withAPIKey: "...myAPI_KEY...", appUserID: uid)
Purchases.configure(PurchasesConfiguration.Builder(this, "...myAPI_KEY...").appUserID(uid).build())
Is there a callback for Purchases.configure(withAPIKey: "...", appUserID: uid)
and/or Purchases.configure(PurchasesConfiguration.Builder(this, "...").appUserID(uid).build())
?