Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save michael-mckenna/c164bfb3d316c9cc90ee7b792bce62ce to your computer and use it in GitHub Desktop.
Save michael-mckenna/c164bfb3d316c9cc90ee7b792bce62ce to your computer and use it in GitHub Desktop.
Realm User Session for Non Admin not completing
SyncUser.logIn(with: credentials,
server: RealmURL.authentication,
timeout: 10) { user, error in
if let user = user {
print("Successfully signed in.")
let appDel = UIApplication.shared.delegate as! AppDelegate
appDel.initializeRealmConfigs()
let _ = RealmHelper.getRealmFor(configuration: RealmConfig.userObjectRealm!)
guard let session = user.session(for: RealmURL.userObjects) else {
return
}
self.token = session.addProgressNotification(for: .download, mode: .forCurrentlyOutstandingWork) { progress in
if progress.isTransferComplete { /******* This line is never hit *******/
self.token?.stop()
DispatchQueue.main.async {
self.removeActivityIndicator()
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment