summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Rex <julian.rex@mapbox.com>2018-11-15 18:13:11 -0500
committerJulian Rex <julian.rex@mapbox.com>2018-11-20 10:15:59 -0500
commitd8bff3958d1d893eeb35fbc10fcc1fabf0a0e2b0 (patch)
tree9cae7fc7b7e6842eb6e7618a504b93de18749080
parenta1978094ad3f59f3f025a932a0b7492937193bd2 (diff)
downloadqtlocation-mapboxgl-d8bff3958d1d893eeb35fbc10fcc1fabf0a0e2b0.tar.gz
Updated for macOS
-rw-r--r--platform/darwin/src/MGLMapSnapshotter.mm9
1 files changed, 5 insertions, 4 deletions
diff --git a/platform/darwin/src/MGLMapSnapshotter.mm b/platform/darwin/src/MGLMapSnapshotter.mm
index 4ecdeef0e9..639a3b62ee 100644
--- a/platform/darwin/src/MGLMapSnapshotter.mm
+++ b/platform/darwin/src/MGLMapSnapshotter.mm
@@ -155,10 +155,11 @@ const CGFloat MGLSnapshotterMinimumPixelSize = 64;
self = [super init];
if (self) {
[self setOptions:options];
- [[NSNotificationCenter defaultCenter] addObserver:self
- selector:@selector(applicationWillTerminate:)
- name:UIApplicationWillTerminateNotification
- object:nil];
+#if TARGET_OS_IPHONE
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:) name:UIApplicationWillTerminateNotification object:nil];
+#else
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:) name:NSApplicationWillTerminateNotification object:nil];
+#endif
}
return self;
}