ios-sdk-examples
ios-sdk-examples copied to clipboard
Offline pack manager example
A common use case for offline packs is a download manager–style table view controller. This use case requires some advanced NSNotification or KVO usage, so we should add an example similar to MBXOfflinePacksTableViewController.
/cc @friedbunny
Going to punt on this for v3.2.0 in favor of linking to the raw ios-app code from the simple offline pack example.
In https://github.com/mapbox/mapbox-gl-native/issues/7810 we saw that a developer ran into troubles when trying to resume packs via per pack KVO. In https://github.com/mapbox/mapbox-gl-native/issues/7810#issuecomment-288192116 I suggested a less complex (not per pack) approach. It may be worth considering incorporating some of that in this example.
Alternatively or in addition to this, adding a dedicated example for automatically resuming an offline pack or packs when an app is launched from from a terminated state might be useful.
cc @friedbunny @jmkiley
@boundsj I attempted moving the relevant parts of my project into a separate class, let me know if you are interested in using this in your example - or wether it makes sense to put this into a CocoaPod for instance
If we're going to do this still, it should be consolidated into the offline example we have.