diff --git a/platform/darwin/src/http_file_source.mm b/platform/darwin/src/http_file_source.mm index 10f50fe9888..80196212197 100644 --- a/platform/darwin/src/http_file_source.mm +++ b/platform/darwin/src/http_file_source.mm @@ -90,7 +90,12 @@ void cancel() { NSURLSessionConfiguration *sessionConfig = MLNNativeNetworkManager.sharedManager.sessionConfiguration; session = [NSURLSession sessionWithConfiguration:sessionConfig]; - userAgent = getUserAgent(); + if (sessionConfig.HTTPAdditionalHeaders[@"User-Agent"] == nil) { + userAgent = getUserAgent(); + } else { + userAgent = sessionConfig.HTTPAdditionalHeaders[@"User-Agent"]; + } + } } diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index b270199d50f..76b3a93640b 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -4,6 +4,10 @@ MapLibre welcomes participation and contributions from everyone. Please read [`C ## main +## 6.4.0 + +- User-Agent in network requests can now be changed via `MLNNativeNetworkManager.sharedManager.sessionConfiguration` ([#2293](https://github.com/maplibre/maplibre-native/pull/2293)). + ## 6.3.3 - Fix memory leak in Metal shader compilation ([#2257](https://github.com/maplibre/maplibre-native/pull/2257)). diff --git a/platform/ios/VERSION b/platform/ios/VERSION index 7849b73dc74..19b860c1872 100644 --- a/platform/ios/VERSION +++ b/platform/ios/VERSION @@ -1 +1 @@ -6.3.3 +6.4.0