How can I poll the current state of sync progress?

Here’s my scenario:

  1. User signs-in online
  2. Device goes offline
  3. User adds/modifies objects in local app DB
  4. User expects a UX/UI in app to indicate there is pending data waiting to sync.

Tried:

let session = appSession.userRealm?.syncSession
uploadToken = session?.addProgressNotification(for: .upload,
                                        mode: .reportIndefinitely) { progress in

    DDLogVerbose("sync progress (.upload): \(progress.fractionTransferred*100.0)")

    if progress.isTransferComplete {
        self.uploadToken?.invalidate()
    }
}

Nothing happens. :frowning:

How can I poll the current state of sync progress?