diff options
Diffstat (limited to 'ios')
-rw-r--r-- | ios/app/MBXAppDelegate.m | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ios/app/MBXAppDelegate.m b/ios/app/MBXAppDelegate.m index f0541b9971..8c5947354a 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,15 @@ return YES; } +- (void)applicationWillEnterForeground:(UIApplication *)application +{ + [MGLMapboxEvents resumeMetricsCollection]; +} + +- (void)applicationDidEnterBackground:(UIApplication *)application +{ + [MGLMapboxEvents pauseMetricsCollection]; +} + + @end |