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/src | |
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/src')
-rw-r--r-- | platform/ios/src/MGLAPIClient.m | 2 | ||||
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 3 |
2 files changed, 2 insertions, 3 deletions
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: |