From 5c005b515895453afd4b6a1a5f3c97d2767137a8 Mon Sep 17 00:00:00 2001 From: Fabian Guerra Date: Fri, 8 Feb 2019 18:51:16 -0800 Subject: [PATCH 1/5] [ios, macos] Expose the url session configuration object. --- platform/darwin/filesource-files.json | 1 + platform/darwin/src/MGLNetworkConfiguration.h | 29 +++++++++-- platform/darwin/src/MGLNetworkConfiguration.m | 52 ++++++++++++++----- platform/darwin/src/http_file_source.mm | 10 ++-- platform/ios/ios.xcodeproj/project.pbxproj | 4 +- platform/ios/sdk-files.json | 3 +- platform/ios/src/Mapbox.h | 1 + .../macos/macos.xcodeproj/project.pbxproj | 2 +- platform/macos/sdk-files.json | 3 +- platform/macos/src/Mapbox.h | 1 + 10 files changed, 78 insertions(+), 28 deletions(-) diff --git a/platform/darwin/filesource-files.json b/platform/darwin/filesource-files.json index f435c438779..3ee96f9b955 100644 --- a/platform/darwin/filesource-files.json +++ b/platform/darwin/filesource-files.json @@ -2,6 +2,7 @@ "//": "This file can be edited manually and is the canonical source.", "sources": [ "platform/darwin/src/MGLLoggingConfiguration.m", + "platform/darwin/src/MGLNetworkConfiguration.m", "platform/darwin/src/http_file_source.mm", "platform/default/src/mbgl/storage/sqlite3.cpp" ], diff --git a/platform/darwin/src/MGLNetworkConfiguration.h b/platform/darwin/src/MGLNetworkConfiguration.h index aaac5a330cc..fcb188ce002 100644 --- a/platform/darwin/src/MGLNetworkConfiguration.h +++ b/platform/darwin/src/MGLNetworkConfiguration.h @@ -1,18 +1,37 @@ #import +#import "MGLFoundation.h" + NS_ASSUME_NONNULL_BEGIN /** - The MGLNetworkConfiguration object provides a global way to set a base API URL for - retrieval of map data, styles, and other resources. - - Currently, MGLNetworkConfiguration is a private API. + The `MGLNetworkConfiguration` object provides a global way to set a base + `NSURLSessionConfiguration`, and other resources. */ +MGL_EXPORT @interface MGLNetworkConfiguration : NSObject -/// Returns the shared instance of the `MGLNetworkConfiguration` class. +/** + Returns the shared instance of the `MGLNetworkConfiguration` class. + */ @property (class, nonatomic, readonly) MGLNetworkConfiguration *sharedManager; +/** + The session configuration object that is used by the `NSURLSession` objects + in this SDK. + + If this property is set to nil or if no session configuration is provided this property + is set to the default session configuration. + + Assign this object before instantiating any `MGLMapView` object. + + @note: `NSURLSession` objects store a copy of this configuration. Any further changes + to mutable properties on this configuration object passed to a session’s initializer + will not affect the behavior of that session. + + */ +@property (strong, null_resettable) NSURLSessionConfiguration *sessionConfiguration; + @end NS_ASSUME_NONNULL_END diff --git a/platform/darwin/src/MGLNetworkConfiguration.m b/platform/darwin/src/MGLNetworkConfiguration.m index 61422f7caa3..8262e7eea19 100644 --- a/platform/darwin/src/MGLNetworkConfiguration.m +++ b/platform/darwin/src/MGLNetworkConfiguration.m @@ -1,23 +1,51 @@ #import "MGLNetworkConfiguration.h" +@interface MGLNetworkConfiguration () + +@property (strong) NSURLSessionConfiguration *sessionConfig; + +@end + @implementation MGLNetworkConfiguration + (instancetype)sharedManager { static dispatch_once_t onceToken; static MGLNetworkConfiguration *_sharedManager; - void (^setupBlock)(void) = ^{ - dispatch_once(&onceToken, ^{ - _sharedManager = [[self alloc] init]; - }); - }; - if (![[NSThread currentThread] isMainThread]) { - dispatch_sync(dispatch_get_main_queue(), ^{ - setupBlock(); - }); - } else { - setupBlock(); - } + dispatch_once(&onceToken, ^{ + _sharedManager = [[self alloc] init]; + _sharedManager.sessionConfiguration = nil; + }); + return _sharedManager; } +- (void)setSessionConfiguration:(NSURLSessionConfiguration *)sessionConfiguration { + @synchronized (self) { + if (sessionConfiguration == nil) { + _sessionConfig = [self defaultSessionConfiguration]; + } else { + _sessionConfig = sessionConfiguration; + } + } +} + +- (NSURLSessionConfiguration *)sessionConfiguration { + NSURLSessionConfiguration *sessionConfig = nil; + @synchronized (self) { + sessionConfig = _sessionConfig; + } + return sessionConfig; +} + +- (NSURLSessionConfiguration *)defaultSessionConfiguration { + NSURLSessionConfiguration* sessionConfiguration = [NSURLSessionConfiguration defaultSessionConfiguration]; + + sessionConfiguration.timeoutIntervalForResource = 30; + sessionConfiguration.HTTPMaximumConnectionsPerHost = 8; + sessionConfiguration.requestCachePolicy = NSURLRequestReloadIgnoringLocalCacheData; + sessionConfiguration.URLCache = nil; + + return sessionConfiguration; +} + @end diff --git a/platform/darwin/src/http_file_source.mm b/platform/darwin/src/http_file_source.mm index f11d44ea54c..c3918ad62bf 100644 --- a/platform/darwin/src/http_file_source.mm +++ b/platform/darwin/src/http_file_source.mm @@ -8,6 +8,7 @@ #import #import "MGLLoggingConfiguration_Private.h" +#import "MGLNetworkConfiguration.h" #include #include @@ -82,13 +83,10 @@ void cancel() { public: Impl() { @autoreleasepool { - NSURLSessionConfiguration* sessionConfig = - [NSURLSessionConfiguration defaultSessionConfiguration]; - sessionConfig.timeoutIntervalForResource = 30; - sessionConfig.HTTPMaximumConnectionsPerHost = 8; - sessionConfig.requestCachePolicy = NSURLRequestReloadIgnoringLocalCacheData; - sessionConfig.URLCache = nil; + NSURLSessionConfiguration *sessionConfig = + [MGLNetworkConfiguration sharedManager].sessionConfiguration; + session = [NSURLSession sessionWithConfiguration:sessionConfig]; userAgent = getUserAgent(); diff --git a/platform/ios/ios.xcodeproj/project.pbxproj b/platform/ios/ios.xcodeproj/project.pbxproj index 8d5a7258486..0aa68018beb 100644 --- a/platform/ios/ios.xcodeproj/project.pbxproj +++ b/platform/ios/ios.xcodeproj/project.pbxproj @@ -443,7 +443,7 @@ 96E516F22000596D00A02306 /* NSException+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8848141CBAFA6200AB86E3 /* NSException+MGLAdditions.h */; }; 96E516F32000597100A02306 /* NSDictionary+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 408AA8551DAEDA0800022900 /* NSDictionary+MGLAdditions.h */; }; 96E516F42000597D00A02306 /* NSData+MGLAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 35305D461D22AA450007D005 /* NSData+MGLAdditions.h */; }; - 96E516F5200059B100A02306 /* MGLNetworkConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = DD0902A41DB18F1B00C5BDCE /* MGLNetworkConfiguration.h */; }; + 96E516F5200059B100A02306 /* MGLNetworkConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = DD0902A41DB18F1B00C5BDCE /* MGLNetworkConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; 96E516F6200059EC00A02306 /* MGLRendererFrontend.h in Headers */ = {isa = PBXBuildFile; fileRef = 92F2C3EC1F0E3C3A00268EC0 /* MGLRendererFrontend.h */; }; 96E516F720005A2700A02306 /* MGLAnnotationContainerView.h in Headers */ = {isa = PBXBuildFile; fileRef = 40EDA1BD1CFE0D4A00D9EA68 /* MGLAnnotationContainerView.h */; }; 96E516F820005A3000A02306 /* MGLCompactCalloutView.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8848441CBAFB9800AB86E3 /* MGLCompactCalloutView.h */; }; @@ -722,7 +722,7 @@ DAF25720201902BC00367EF5 /* MGLHillshadeStyleLayerTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = DAF2571F201902BB00367EF5 /* MGLHillshadeStyleLayerTests.mm */; }; DD0902A91DB1929D00C5BDCE /* MGLNetworkConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = DD0902A21DB18DE700C5BDCE /* MGLNetworkConfiguration.m */; }; DD0902AA1DB1929D00C5BDCE /* MGLNetworkConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = DD0902A21DB18DE700C5BDCE /* MGLNetworkConfiguration.m */; }; - DD0902AB1DB192A800C5BDCE /* MGLNetworkConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = DD0902A41DB18F1B00C5BDCE /* MGLNetworkConfiguration.h */; }; + DD0902AB1DB192A800C5BDCE /* MGLNetworkConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = DD0902A41DB18F1B00C5BDCE /* MGLNetworkConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; DD4823751D94AE6C00EB71B7 /* fill_filter_style.json in Resources */ = {isa = PBXBuildFile; fileRef = DD4823721D94AE6C00EB71B7 /* fill_filter_style.json */; }; DD4823761D94AE6C00EB71B7 /* line_filter_style.json in Resources */ = {isa = PBXBuildFile; fileRef = DD4823731D94AE6C00EB71B7 /* line_filter_style.json */; }; DD4823771D94AE6C00EB71B7 /* numeric_filter_style.json in Resources */ = {isa = PBXBuildFile; fileRef = DD4823741D94AE6C00EB71B7 /* numeric_filter_style.json */; }; diff --git a/platform/ios/sdk-files.json b/platform/ios/sdk-files.json index 0bf09e48fa1..3248e359b0a 100644 --- a/platform/ios/sdk-files.json +++ b/platform/ios/sdk-files.json @@ -158,6 +158,7 @@ "MGLAccountManager.h": "platform/darwin/src/MGLAccountManager.h", "NSValue+MGLAdditions.h": "platform/darwin/src/NSValue+MGLAdditions.h", "MGLVectorStyleLayer.h": "platform/darwin/src/MGLVectorStyleLayer.h", + "MGLNetworkConfiguration.h": "platform/darwin/src/MGLNetworkConfiguration.h", "MGLComputedShapeSource.h": "platform/darwin/src/MGLComputedShapeSource.h", "MGLLoggingConfiguration.h": "platform/darwin/src/MGLLoggingConfiguration.h", "MGLLocationManager.h": "platform/darwin/src/MGLLocationManager.h", @@ -219,6 +220,7 @@ "MGLStyle_Private.h": "platform/darwin/src/MGLStyle_Private.h", "MGLHeatmapStyleLayer_Private.h": "platform/darwin/src/MGLHeatmapStyleLayer_Private.h", "NSPredicate+MGLPrivateAdditions.h": "platform/darwin/src/NSPredicate+MGLPrivateAdditions.h", + "MGLNetworkConfiguration_Private.h": "platform/darwin/src/MGLNetworkConfiguration_Private.h", "NSDate+MGLAdditions.h": "platform/darwin/src/NSDate+MGLAdditions.h", "MGLCompactCalloutView.h": "platform/ios/src/MGLCompactCalloutView.h", "MGLStyleLayerManager.h": "platform/darwin/src/MGLStyleLayerManager.h", @@ -236,7 +238,6 @@ "MGLLoggingConfiguration_Private.h": "platform/darwin/src/MGLLoggingConfiguration_Private.h", "NSComparisonPredicate+MGLAdditions.h": "platform/darwin/src/NSComparisonPredicate+MGLAdditions.h", "MGLMapAccessibilityElement.h": "platform/ios/src/MGLMapAccessibilityElement.h", - "MGLNetworkConfiguration.h": "platform/darwin/src/MGLNetworkConfiguration.h", "MGLScaleBar.h": "platform/ios/src/MGLScaleBar.h", "NSString+MGLAdditions.h": "platform/darwin/src/NSString+MGLAdditions.h", "UIDevice+MGLAdditions.h": "platform/ios/src/UIDevice+MGLAdditions.h", diff --git a/platform/ios/src/Mapbox.h b/platform/ios/src/Mapbox.h index 829583be6ac..43300b6aa5b 100644 --- a/platform/ios/src/Mapbox.h +++ b/platform/ios/src/Mapbox.h @@ -71,3 +71,4 @@ FOUNDATION_EXPORT MGL_EXPORT const unsigned char MapboxVersionString[]; #import "NSPredicate+MGLAdditions.h" #import "MGLLocationManager.h" #import "MGLLoggingConfiguration.h" +#import "MGLNetworkConfiguration.h" diff --git a/platform/macos/macos.xcodeproj/project.pbxproj b/platform/macos/macos.xcodeproj/project.pbxproj index a618b85a7a8..ad93c317ed5 100644 --- a/platform/macos/macos.xcodeproj/project.pbxproj +++ b/platform/macos/macos.xcodeproj/project.pbxproj @@ -283,7 +283,7 @@ DAF25716201901C200367EF5 /* MGLHillshadeStyleLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = DAF25714201901C200367EF5 /* MGLHillshadeStyleLayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; DAF25721201902C100367EF5 /* MGLHillshadeStyleLayerTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = DAF2571D201902A500367EF5 /* MGLHillshadeStyleLayerTests.mm */; }; DD0902B21DB1AC6400C5BDCE /* MGLNetworkConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = DD0902AF1DB1AC6400C5BDCE /* MGLNetworkConfiguration.m */; }; - DD0902B31DB1AC6400C5BDCE /* MGLNetworkConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = DD0902B01DB1AC6400C5BDCE /* MGLNetworkConfiguration.h */; }; + DD0902B31DB1AC6400C5BDCE /* MGLNetworkConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = DD0902B01DB1AC6400C5BDCE /* MGLNetworkConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; DD58A4C91D822C6700E1F038 /* MGLExpressionTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = DD58A4C71D822C6200E1F038 /* MGLExpressionTests.mm */; }; /* End PBXBuildFile section */ diff --git a/platform/macos/sdk-files.json b/platform/macos/sdk-files.json index f7d2fd34266..afc5efbabe8 100644 --- a/platform/macos/sdk-files.json +++ b/platform/macos/sdk-files.json @@ -109,6 +109,7 @@ "MGLFillStyleLayer.h": "platform/darwin/src/MGLFillStyleLayer.h", "MGLCoordinateFormatter.h": "platform/darwin/src/MGLCoordinateFormatter.h", "MGLShapeOfflineRegion.h": "platform/darwin/src/MGLShapeOfflineRegion.h", + "MGLNetworkConfiguration.h": "platform/darwin/src/MGLNetworkConfiguration.h", "MGLOverlay.h": "platform/darwin/src/MGLOverlay.h", "MGLPolyline.h": "platform/darwin/src/MGLPolyline.h", "MGLLineStyleLayer.h": "platform/darwin/src/MGLLineStyleLayer.h", @@ -168,9 +169,9 @@ "NSException+MGLAdditions.h": "platform/darwin/src/NSException+MGLAdditions.h", "MGLTileSource_Private.h": "platform/darwin/src/MGLTileSource_Private.h", "NSExpression+MGLPrivateAdditions.h": "platform/darwin/src/NSExpression+MGLPrivateAdditions.h", + "MGLNetworkConfiguration_Private.h": "platform/darwin/src/MGLNetworkConfiguration_Private.h", "NSCompoundPredicate+MGLAdditions.h": "platform/darwin/src/NSCompoundPredicate+MGLAdditions.h", "MGLSymbolStyleLayer_Private.h": "platform/darwin/src/MGLSymbolStyleLayer_Private.h", - "MGLNetworkConfiguration.h": "platform/darwin/src/MGLNetworkConfiguration.h", "NSProcessInfo+MGLAdditions.h": "platform/darwin/src/NSProcessInfo+MGLAdditions.h", "MGLRendererFrontend.h": "platform/darwin/src/MGLRendererFrontend.h", "NSValue+MGLStyleAttributeAdditions.h": "platform/darwin/src/NSValue+MGLStyleAttributeAdditions.h", diff --git a/platform/macos/src/Mapbox.h b/platform/macos/src/Mapbox.h index 0fd81a4df70..4d54c753df2 100644 --- a/platform/macos/src/Mapbox.h +++ b/platform/macos/src/Mapbox.h @@ -66,3 +66,4 @@ FOUNDATION_EXPORT MGL_EXPORT const unsigned char MapboxVersionString[]; #import "NSExpression+MGLAdditions.h" #import "NSPredicate+MGLAdditions.h" #import "MGLLoggingConfiguration.h" +#import "MGLNetworkConfiguration.h" From 5382d59b763ff035e07ef68fce5703eacb859a50 Mon Sep 17 00:00:00 2001 From: Fabian Guerra Date: Wed, 13 Feb 2019 14:14:42 -0800 Subject: [PATCH 2/5] [ios, macos] Update changelogs. --- platform/ios/CHANGELOG.md | 1 + platform/macos/CHANGELOG.md | 1 + 2 files changed, 2 insertions(+) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index aa7ad42b9e8..2fc4d092198 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -7,6 +7,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT * Fixed a bug where setting `MGLMapView.userTrackingMode` to `MGLUserTrackingModeFollowWithHeading` or `MGLUserTrackingModeFollowWithCourse` would be ignored if the user’s location was not already available. ([#13849](https://github.com/mapbox/mapbox-gl-native/pull/13849)) * Improved tilt gesture performance. ([#13902](https://github.com/mapbox/mapbox-gl-native/pull/13902)) * Fixed a bug where `layoutSubviews` was always called on device rotation, regardless of the application's or top-most view controller's supported orientations. ([#13900](https://github.com/mapbox/mapbox-gl-native/pull/13900)) +* Added the `MGLNetworkConfiguration` class customize the SDK `NSURLSessionConfiguration` object. ([#11447](https://github.com/mapbox/mapbox-gl-native/pull/13886)) ## 4.8.0 - January 30, 2019 diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md index 4754ae8ddbe..adb9dec21bf 100644 --- a/platform/macos/CHANGELOG.md +++ b/platform/macos/CHANGELOG.md @@ -7,6 +7,7 @@ * Added an `MGLStyle.performsPlacementTransitions` property to control how long it takes for colliding labels to fade out. ([#13565](https://github.com/mapbox/mapbox-gl-native/pull/13565)) * Fixed a crash when casting large numbers in `NSExpression`. ([#13580](https://github.com/mapbox/mapbox-gl-native/pull/13580)) * Added the `-[MGLShapeSource leavesOfCluster:offset:limit:]`, `-[MGLShapeSource childrenOfCluster:]`, `-[MGLShapeSource zoomLevelForExpandingCluster:]` methods for inspecting a cluster in an `MGLShapeSource`s created with the `MGLShapeSourceOptionClustered` option. Feature querying now returns clusters represented by `MGLPointFeatureCluster` objects (that conform to the `MGLCluster` protocol). ([#12952](https://github.com/mapbox/mapbox-gl-native/pull/12952) +* Added the `MGLNetworkConfiguration` class customize the SDK `NSURLSessionConfiguration` object. ([#11447](https://github.com/mapbox/mapbox-gl-native/pull/13886)) ### Annotations From 019d250441c792eeaa7c71bca56870fe9ef57fc4 Mon Sep 17 00:00:00 2001 From: Fabian Guerra Date: Wed, 13 Feb 2019 15:47:01 -0800 Subject: [PATCH 3/5] [ios, macos] Remove unused headers. --- platform/ios/sdk-files.json | 1 - platform/macos/sdk-files.json | 1 - 2 files changed, 2 deletions(-) diff --git a/platform/ios/sdk-files.json b/platform/ios/sdk-files.json index 3248e359b0a..2267f3ce423 100644 --- a/platform/ios/sdk-files.json +++ b/platform/ios/sdk-files.json @@ -220,7 +220,6 @@ "MGLStyle_Private.h": "platform/darwin/src/MGLStyle_Private.h", "MGLHeatmapStyleLayer_Private.h": "platform/darwin/src/MGLHeatmapStyleLayer_Private.h", "NSPredicate+MGLPrivateAdditions.h": "platform/darwin/src/NSPredicate+MGLPrivateAdditions.h", - "MGLNetworkConfiguration_Private.h": "platform/darwin/src/MGLNetworkConfiguration_Private.h", "NSDate+MGLAdditions.h": "platform/darwin/src/NSDate+MGLAdditions.h", "MGLCompactCalloutView.h": "platform/ios/src/MGLCompactCalloutView.h", "MGLStyleLayerManager.h": "platform/darwin/src/MGLStyleLayerManager.h", diff --git a/platform/macos/sdk-files.json b/platform/macos/sdk-files.json index afc5efbabe8..3c728ad37d0 100644 --- a/platform/macos/sdk-files.json +++ b/platform/macos/sdk-files.json @@ -169,7 +169,6 @@ "NSException+MGLAdditions.h": "platform/darwin/src/NSException+MGLAdditions.h", "MGLTileSource_Private.h": "platform/darwin/src/MGLTileSource_Private.h", "NSExpression+MGLPrivateAdditions.h": "platform/darwin/src/NSExpression+MGLPrivateAdditions.h", - "MGLNetworkConfiguration_Private.h": "platform/darwin/src/MGLNetworkConfiguration_Private.h", "NSCompoundPredicate+MGLAdditions.h": "platform/darwin/src/NSCompoundPredicate+MGLAdditions.h", "MGLSymbolStyleLayer_Private.h": "platform/darwin/src/MGLSymbolStyleLayer_Private.h", "NSProcessInfo+MGLAdditions.h": "platform/darwin/src/NSProcessInfo+MGLAdditions.h", From 870c7df1e58d9eb1ccbed7535a28f028ee8545a2 Mon Sep 17 00:00:00 2001 From: Fabian Guerra Date: Mon, 18 Feb 2019 10:27:53 -0800 Subject: [PATCH 4/5] [ios, macos] Update changelogs. --- platform/ios/CHANGELOG.md | 2 +- platform/macos/CHANGELOG.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 2fc4d092198..34977e2a03d 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -7,7 +7,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT * Fixed a bug where setting `MGLMapView.userTrackingMode` to `MGLUserTrackingModeFollowWithHeading` or `MGLUserTrackingModeFollowWithCourse` would be ignored if the user’s location was not already available. ([#13849](https://github.com/mapbox/mapbox-gl-native/pull/13849)) * Improved tilt gesture performance. ([#13902](https://github.com/mapbox/mapbox-gl-native/pull/13902)) * Fixed a bug where `layoutSubviews` was always called on device rotation, regardless of the application's or top-most view controller's supported orientations. ([#13900](https://github.com/mapbox/mapbox-gl-native/pull/13900)) -* Added the `MGLNetworkConfiguration` class customize the SDK `NSURLSessionConfiguration` object. ([#11447](https://github.com/mapbox/mapbox-gl-native/pull/13886)) +* Added `MGLNetworkConfiguration` class to customize the SDK's `NSURLSessionConfiguration` object. ([#11447](https://github.com/mapbox/mapbox-gl-native/pull/13886)) ## 4.8.0 - January 30, 2019 diff --git a/platform/macos/CHANGELOG.md b/platform/macos/CHANGELOG.md index adb9dec21bf..7e9c844059b 100644 --- a/platform/macos/CHANGELOG.md +++ b/platform/macos/CHANGELOG.md @@ -7,7 +7,7 @@ * Added an `MGLStyle.performsPlacementTransitions` property to control how long it takes for colliding labels to fade out. ([#13565](https://github.com/mapbox/mapbox-gl-native/pull/13565)) * Fixed a crash when casting large numbers in `NSExpression`. ([#13580](https://github.com/mapbox/mapbox-gl-native/pull/13580)) * Added the `-[MGLShapeSource leavesOfCluster:offset:limit:]`, `-[MGLShapeSource childrenOfCluster:]`, `-[MGLShapeSource zoomLevelForExpandingCluster:]` methods for inspecting a cluster in an `MGLShapeSource`s created with the `MGLShapeSourceOptionClustered` option. Feature querying now returns clusters represented by `MGLPointFeatureCluster` objects (that conform to the `MGLCluster` protocol). ([#12952](https://github.com/mapbox/mapbox-gl-native/pull/12952) -* Added the `MGLNetworkConfiguration` class customize the SDK `NSURLSessionConfiguration` object. ([#11447](https://github.com/mapbox/mapbox-gl-native/pull/13886)) +* Added `MGLNetworkConfiguration` class to customize the SDK's `NSURLSessionConfiguration` object. ([#11447](https://github.com/mapbox/mapbox-gl-native/pull/13886)) ### Annotations From edbaedd9a5ad310f6b0a3af1b8050b89948587db Mon Sep 17 00:00:00 2001 From: Fabian Guerra Date: Mon, 18 Feb 2019 11:09:19 -0800 Subject: [PATCH 5/5] [ios, macos] Clarify session configuration property atomicity. --- platform/darwin/src/MGLNetworkConfiguration.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/darwin/src/MGLNetworkConfiguration.h b/platform/darwin/src/MGLNetworkConfiguration.h index fcb188ce002..6c56050aaee 100644 --- a/platform/darwin/src/MGLNetworkConfiguration.h +++ b/platform/darwin/src/MGLNetworkConfiguration.h @@ -30,7 +30,7 @@ MGL_EXPORT will not affect the behavior of that session. */ -@property (strong, null_resettable) NSURLSessionConfiguration *sessionConfiguration; +@property (atomic, strong, null_resettable) NSURLSessionConfiguration *sessionConfiguration; @end