diff options
author | Jason Wray <friedbunny@users.noreply.github.com> | 2017-05-23 13:24:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-23 13:24:16 -0400 |
commit | 9b11bb98fa855da9d845ed01e59451943bb29af4 (patch) | |
tree | 48b290663e9f4cbeed09483d20f0558b6ccdde2f /platform/ios | |
parent | c9de6cdb6c8b4a640c10940adbd76ed508900022 (diff) | |
download | qtlocation-mapboxgl-9b11bb98fa855da9d845ed01e59451943bb29af4.tar.gz |
[ios] Fallback to Mapbox.bundle as the framework bundle (#9074)
Fixes an issue where localizations could not be found when using static builds.
Throws exception if our bundle can't be found.
Diffstat (limited to 'platform/ios')
-rw-r--r-- | platform/ios/CHANGELOG.md | 1 | ||||
-rw-r--r-- | platform/ios/src/MGLAPIClient.m | 2 | ||||
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 3 |
3 files changed, 3 insertions, 3 deletions
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 15e3c7a081..b5a0e7dd7d 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -38,6 +38,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT * The error passed into `-[MGLMapViewDelegate mapViewDidFailLoadingMap:withError:]` now includes a more specific description and failure reason. ([#8418](https://github.com/mapbox/mapbox-gl-native/pull/8418)) * Fixed an issue rendering polylines that contain duplicate vertices. ([#8808](https://github.com/mapbox/mapbox-gl-native/pull/8808)) * Fixed a bug which caused the compass and other ornaments to underlap navigation and tab bars. ([#7716](https://github.com/mapbox/mapbox-gl-native/pull/7716)) +* Fixed an issue in the static framework where localizations would never load. ([#9074](https://github.com/mapbox/mapbox-gl-native/pull/9074)) ## 3.5.4 - May 9, 2017 diff --git a/platform/ios/src/MGLAPIClient.m b/platform/ios/src/MGLAPIClient.m index 22ee5c55f5..124d436197 100644 --- a/platform/ios/src/MGLAPIClient.m +++ b/platform/ios/src/MGLAPIClient.m @@ -117,7 +117,7 @@ static NSString * const MGLAPIClientHTTPMethodPost = @"POST"; - (void)loadCertificate:(NSData **)certificate withResource:(NSString *)resource { NSBundle *frameworkBundle = [NSBundle mgl_frameworkBundle]; - NSString *cerPath = [frameworkBundle pathForResource:resource ofType:@"der" inDirectory:frameworkBundle.mgl_resourcesDirectory]; + NSString *cerPath = [frameworkBundle pathForResource:resource ofType:@"der"]; if (cerPath != nil) { *certificate = [NSData dataWithContentsOfFile:cerPath]; } diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 720c1d506a..9a27cf24c6 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -5293,8 +5293,7 @@ public: NSString *extension = imageName.pathExtension.length ? imageName.pathExtension : @"png"; NSBundle *bundle = [NSBundle mgl_frameworkBundle]; NSString *path = [bundle pathForResource:imageName.stringByDeletingPathExtension - ofType:extension - inDirectory:bundle.mgl_resourcesDirectory]; + ofType:extension]; if ( ! path) { [NSException raise:@"Resource not found" format: |