summaryrefslogtreecommitdiff
path: root/platform/darwin/src
diff options
context:
space:
mode:
Diffstat (limited to 'platform/darwin/src')
-rw-r--r--platform/darwin/src/MGLOfflineStorage.mm18
-rw-r--r--platform/darwin/src/MGLShapeOfflineRegion.mm18
-rw-r--r--platform/darwin/src/MGLTilePyramidOfflineRegion.mm18
3 files changed, 27 insertions, 27 deletions
diff --git a/platform/darwin/src/MGLOfflineStorage.mm b/platform/darwin/src/MGLOfflineStorage.mm
index a7af85edbc..ce118b789c 100644
--- a/platform/darwin/src/MGLOfflineStorage.mm
+++ b/platform/darwin/src/MGLOfflineStorage.mm
@@ -373,17 +373,17 @@ const MGLExceptionName MGLUnsupportedRegionTypeException = @"MGLUnsupportedRegio
if (completion) {
completion(pack, error);
}
-
- #if TARGET_OS_IOS
- NSMutableDictionary *offlineDownloadStartEventAttributes = [NSMutableDictionary dictionaryWithObject:MMEventTypeOfflineDownloadStart forKey:MMEEventKeyEvent];
- if ([region conformsToProtocol:@protocol(MGLOfflineRegion_Private)]) {
- NSDictionary *regionAttributes = ((id<MGLOfflineRegion_Private>)region).offlineStartEventAttributes;
- [offlineDownloadStartEventAttributes addEntriesFromDictionary:regionAttributes];
- }
+#if TARGET_OS_IOS
+ NSMutableDictionary *offlineDownloadStartEventAttributes = [NSMutableDictionary dictionaryWithObject:MMEventTypeOfflineDownloadStart forKey:MMEEventKeyEvent];
- [MGLMapboxEvents pushEvent:MMEventTypeOfflineDownloadStart withAttributes:offlineDownloadStartEventAttributes];
- #endif
+ if ([region conformsToProtocol:@protocol(MGLOfflineRegion_Private)]) {
+ NSDictionary *regionAttributes = ((id<MGLOfflineRegion_Private>)region).offlineStartEventAttributes;
+ [offlineDownloadStartEventAttributes addEntriesFromDictionary:regionAttributes];
+ }
+
+ [MGLMapboxEvents pushEvent:MMEventTypeOfflineDownloadStart withAttributes:offlineDownloadStartEventAttributes];
+#endif
}];
}
diff --git a/platform/darwin/src/MGLShapeOfflineRegion.mm b/platform/darwin/src/MGLShapeOfflineRegion.mm
index 2a1b01d2d0..fdab6c3f67 100644
--- a/platform/darwin/src/MGLShapeOfflineRegion.mm
+++ b/platform/darwin/src/MGLShapeOfflineRegion.mm
@@ -13,7 +13,7 @@
#import "MGLStyle.h"
#import "MGLLoggingConfiguration_Private.h"
-#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
+#if TARGET_OS_IOS
#import "MMEConstants.h"
#endif
@@ -28,15 +28,15 @@
@synthesize styleURL = _styleURL;
@synthesize includesIdeographicGlyphs = _includesIdeographicGlyphs;
--(NSDictionary *)offlineStartEventAttributes {
+- (NSDictionary *)offlineStartEventAttributes {
return @{
- #if TARGET_OS_IOS
- MMEEventKeyShapeForOfflineRegion: @"shaperegion",
- MMEEventKeyMinZoomLevel: @(self.minimumZoomLevel),
- MMEEventKeyMaxZoomLevel: @(self.maximumZoomLevel),
- MMEEventKeyStyleURL: self.styleURL.absoluteString ?: [NSNull null]
- #endif
- };
+#if TARGET_OS_IOS
+ MMEEventKeyShapeForOfflineRegion: @"shaperegion",
+ MMEEventKeyMinZoomLevel: @(self.minimumZoomLevel),
+ MMEEventKeyMaxZoomLevel: @(self.maximumZoomLevel),
+ MMEEventKeyStyleURL: self.styleURL.absoluteString ?: [NSNull null]
+#endif
+ };
}
+ (BOOL)supportsSecureCoding {
diff --git a/platform/darwin/src/MGLTilePyramidOfflineRegion.mm b/platform/darwin/src/MGLTilePyramidOfflineRegion.mm
index 3304e108dd..8b42f175f7 100644
--- a/platform/darwin/src/MGLTilePyramidOfflineRegion.mm
+++ b/platform/darwin/src/MGLTilePyramidOfflineRegion.mm
@@ -10,7 +10,7 @@
#import "MGLStyle.h"
#import "MGLLoggingConfiguration_Private.h"
-#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
+#if TARGET_OS_IOS
#import "MMEConstants.h"
#endif
@@ -25,15 +25,15 @@
@synthesize styleURL = _styleURL;
@synthesize includesIdeographicGlyphs = _includesIdeographicGlyphs;
--(NSDictionary *)offlineStartEventAttributes {
+- (NSDictionary *)offlineStartEventAttributes {
return @{
- #if TARGET_OS_IOS
- MMEEventKeyShapeForOfflineRegion: @"tileregion",
- MMEEventKeyMinZoomLevel: @(self.minimumZoomLevel),
- MMEEventKeyMaxZoomLevel: @(self.maximumZoomLevel),
- MMEEventKeyStyleURL: self.styleURL.absoluteString ?: [NSNull null]
- #endif
- };
+#if TARGET_OS_IOS
+ MMEEventKeyShapeForOfflineRegion: @"tileregion",
+ MMEEventKeyMinZoomLevel: @(self.minimumZoomLevel),
+ MMEEventKeyMaxZoomLevel: @(self.maximumZoomLevel),
+ MMEEventKeyStyleURL: self.styleURL.absoluteString ?: [NSNull null]
+#endif
+ };
}
+ (BOOL)supportsSecureCoding {