# Monitoring Download Progress

This page instructs how to subscribe to download progress updates for routing data and map tiles and releasing the subscription once the download finishes.

_observeOfflineRegionProgress_ combines routing and map progress by `regionId` and calculates `overallState` and `overallPercent`. The callback is delivered on the main queue and can update _UIKit directly_. The minimum supported polling interval is **200 milliseconds**.

## Subscribe and Publish progress updates

```swift
private var progressSubscription: NBNavigation.OfflineProgressSubscription?

func startObservingProgress() {
    progressSubscription = NBNavigation.observeOfflineRegionProgress(
        intervalMs: 1_000
    ) { [weak self] rows in
        self?.applyProgress(rows) // Delivered on the main queue.
}
   }

func stopObservingProgress() {
    progressSubscription?.cancel()
    progressSubscription = nil
}
```

The screen must retain the subscription and cancel it when the screen closes. Canceling the subscription stops only UI polling but it does not stop the download. To display each data source separately, use _observeUnifiedOfflineProgress_ and distinguish routing from map through `entry.kind`.

| Field | Meaning | UI guidance |
| --- | --- | --- |
| `overallState` | Combined region task state | Controls buttons and status text |
| `overallPercent` | Combined percentage for routing data and map tiles | Displays overall progress |
| `routeNetwork` | Routing subtask, if available | Shows routing-data status |
| `mapTile` | Map-tile subtask, if available | Shows map-display data status |
