summaryrefslogtreecommitdiff
path: root/ios/app/MBXAppDelegate.m
blob: f2ef69ec634d9ee90dd1aa42885360d344f0d40f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#import "MBXAppDelegate.h"
#import "MBXViewController.h"
#import <mbgl/ios/MGLMapboxEvents.h>

@implementation MBXAppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:[MBXViewController new]];
    [self.window makeKeyAndVisible];

    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