Esri / arcgis-maps-sdk-swift-toolkit

Mapping components that will simplify your Swift app development with the ArcGIS Maps SDK for Swift.
https://developers.arcgis.com/swift
Apache License 2.0
25 stars 7 forks source link

Add offline manager #774

Closed rolson closed 1 week ago

rolson commented 1 week ago

Note: the user will still have to add the required job manager plist settings to the app, there is no way to workaround that requirement.

The approach taken in this PR fixes a few lifetime issues. One main one, consider this case:

This PR fixes the above situation by introducing an always-alive OfflineManager singleton, which is initialized through the offlineManager(...) Scene extension method. Now when the app is restarted and a job completes, you don't need to open the OfflineAreasView to run the completion code.

rolson commented 1 week ago

Looks good. OfflineMapAreasExampleApp.AppDelegate could be removed if we decide that only background and not foreground notifications are needed.

I have another PR that I will open after this with some logging added and a bug fix, and I will remove the file in that PR.