summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Leege <bleege@gmail.com>2015-04-07 16:18:38 -0500
committerBrad Leege <bleege@gmail.com>2015-04-07 16:18:38 -0500
commitec0052bd4ecf3be7f4c46474df8bff1e7293d92e (patch)
tree4dd34380ee50b8134b58167aed3283f9b88c4210
parente86597011f83022fd534c7cac2afe058b386b4b2 (diff)
downloadqtlocation-mapboxgl-ec0052bd4ecf3be7f4c46474df8bff1e7293d92e.tar.gz
#1216 - Documenting use of pauseMetricsCollection and resumeMetricsCollection
-rw-r--r--ios/app/MBXAppDelegate.m10
1 files changed, 10 insertions, 0 deletions
diff --git a/ios/app/MBXAppDelegate.m b/ios/app/MBXAppDelegate.m
index 8c5947354a..75e02c9980 100644
--- a/ios/app/MBXAppDelegate.m
+++ b/ios/app/MBXAppDelegate.m
@@ -15,11 +15,21 @@
- (void)applicationWillEnterForeground:(UIApplication *)application
{
+ // Example of how to resume Metrics Collection
+
+ // Reasons for needing to resume:
+ // 1. In UIBackground and app starts listening for Location Updates where it previously had not been listening.
+ // 2. App is entering foreground where it had called pauseMetricsCollection.
[MGLMapboxEvents resumeMetricsCollection];
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
+ // Example of how to pause Metrics Collection
+
+ // Reason for needing to pause:
+ // 1. Either entering or already in UIBackground and app stops listening for Location Updates
+ // via any CLLocationManager instance it may have.
[MGLMapboxEvents pauseMetricsCollection];
}