summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wray <friedbunny@users.noreply.github.com>2016-12-23 19:40:54 -0500
committerGitHub <noreply@github.com>2016-12-23 19:40:54 -0500
commitf03cfd8bd50765556e76dcf11e9ae19c94a066cf (patch)
treee357da6e43d6209b4f0a6a3ba28a6a8069bf4b18
parenta66b1f7599bba67dce669b000a7d37d61010377f (diff)
downloadqtlocation-mapboxgl-f03cfd8bd50765556e76dcf11e9ae19c94a066cf.tar.gz
[ios] Document that offline pack resource removal is not guaranteed (#7522)
Text adapted from: https://www.mapbox.com/help/mobile-offline/#removing-offline-regions
-rw-r--r--platform/darwin/src/MGLOfflineStorage.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/platform/darwin/src/MGLOfflineStorage.h b/platform/darwin/src/MGLOfflineStorage.h
index c58907d0d5..6e60f26e77 100644
--- a/platform/darwin/src/MGLOfflineStorage.h
+++ b/platform/darwin/src/MGLOfflineStorage.h
@@ -182,8 +182,8 @@ typedef void (^MGLOfflinePackRemovalCompletionHandler)(NSError * _Nullable error
- (void)addPackForRegion:(id <MGLOfflineRegion>)region withContext:(NSData *)context completionHandler:(nullable MGLOfflinePackAdditionCompletionHandler)completion;
/**
- Unregisters the given offline pack and frees any resources that are no longer
- required by any remaining packs.
+ Unregisters the given offline pack and allows resources that are no longer
+ required by any remaining packs to be potentially freed.
As soon as this method is called on a pack, the pack becomes invalid; any
attempt to send it a message will result in an exception being thrown. If an
@@ -195,6 +195,13 @@ typedef void (^MGLOfflinePackRemovalCompletionHandler)(NSError * _Nullable error
KVO change notifications on the shared offline storage object’s `packs` key
path. Removals from that array result in an `NSKeyValueChangeRemoval` change.
+ When you remove an offline pack, any resources that are required by that pack,
+ but not other packs, become eligible for deletion from offline storage. Because
+ the backing store used for offline storage is also used as a general purpose
+ cache for map resources, such resources may not be immediately removed if the
+ implementation determines that they remain useful for general performance of
+ the map.
+
@param pack The offline pack to remove.
@param completion The completion handler to call once the pack has been
removed. This handler is executed asynchronously on the main queue.