Monitoring AsyncOpenTask on initial launch not returning progress

I’m in the process of moving my app from CloudKit to Realm (+Realm Sync with Atlas). I completed most of the steps, but now I’m working on the initial sync of data.

I want to display a nice progress bar on the initial sync using the addProgressNotification on the AsyncOpenTask. The “problem” is the data is syncing too fast and I’m not receiving any progress notification. In realty this is excellent news as I only have around 300 public documents for each user to sync and Realm Sync is doing this instantly, but I still want to understand how to intercept the download and show a progress once de collection will evolve.

Steps:

  1. app.login(…)

  2. Async open:
    config = realmUser.configuration(partitionValue: “…”)
    let task = Realm.asyncOpen(configuration: config…)

  3. Monitor task

    task.addProgressNotification(queue: .main) { [weak self] progress in
    if progress.isTransferComplete {
    self?.progressAmount = 0
    self?.logger.debug(“Transfer finished”)
    } else {

    }

The debugger is never entering the “else” statement. Once it receives a progress it will have the isTransferComplete state already set to true.

Notes:
progress.transferredBytes = 10419
progress.transferrableBytes = 10419
progress.fractionTransferred = 1.0

Are there some thresholds under which the transfer is set directly to done?

I’ve noticed transferredBytes and transferrableBytes are always equal even on large datasets. Each update I receive is always 100%, just growing over the last update.