diff options
author | Brad Leege <bleege@gmail.com> | 2015-04-07 15:53:17 -0500 |
---|---|---|
committer | Brad Leege <bleege@gmail.com> | 2015-04-07 15:53:17 -0500 |
commit | e86597011f83022fd534c7cac2afe058b386b4b2 (patch) | |
tree | 2d434224ece98ea9cc3f8535e12ab5f795890a9e /ios | |
parent | 482275f978007ec30d098889729e61ba2a095b32 (diff) | |
download | qtlocation-mapboxgl-e86597011f83022fd534c7cac2afe058b386b4b2.tar.gz |
#1216 - Added test usage of pausing / resuming Metrics to simulate app entering background mode and no other location manager running. Added paused state checking to pauseMetricsCollection and resumeMetricsCollection
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 |