summaryrefslogtreecommitdiff
path: root/ios/app/MBXAppDelegate.m
diff options
context:
space:
mode:
Diffstat (limited to 'ios/app/MBXAppDelegate.m')
-rw-r--r--ios/app/MBXAppDelegate.m23
1 files changed, 23 insertions, 0 deletions
diff --git a/ios/app/MBXAppDelegate.m b/ios/app/MBXAppDelegate.m
index f0541b9971..f2ef69ec63 100644
--- a/ios/app/MBXAppDelegate.m
+++ b/ios/app/MBXAppDelegate.m
@@ -1,5 +1,6 @@
#import "MBXAppDelegate.h"
#import "MBXViewController.h"
+#import <mbgl/ios/MGLMapboxEvents.h>
@implementation MBXAppDelegate
@@ -12,4 +13,26 @@
return YES;
}
+/**
+- (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];
+}
+*/
+
@end