summaryrefslogtreecommitdiff
path: root/platform/ios/src/MGLAPIClient.m
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-03-07 14:55:44 -0800
committerMinh Nguyễn <mxn@1ec5.org>2016-03-08 11:20:12 -0800
commitc2cd9335e9c9ff599cd84723eada6a503d1e5c80 (patch)
tree9a78b8e0850dc08ea20046bee72d1a350867eb07 /platform/ios/src/MGLAPIClient.m
parente49c1e3da3bdc1ddcdf1d78e11a0fecd861cba88 (diff)
downloadqtlocation-mapboxgl-c2cd9335e9c9ff599cd84723eada6a503d1e5c80.tar.gz
[ios] Non-embedded static framework
Added a new ifabric Make target for packaging up a static framework similar to the one released as 3.0.1. Place artwork and certificate assets inside Mapbox.bundle inside Mapbox.framework. Link SystemConfiguration in the umbrella header. Distinguish between the framework bundle and the resources bundle. For the dynamic frameworks and embedded static frameworks, the two are the same; for the non-embedded static framework, the latter resides inside the former.
Diffstat (limited to 'platform/ios/src/MGLAPIClient.m')
-rw-r--r--platform/ios/src/MGLAPIClient.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/platform/ios/src/MGLAPIClient.m b/platform/ios/src/MGLAPIClient.m
index 441c7c16f9..7a72496ac0 100644
--- a/platform/ios/src/MGLAPIClient.m
+++ b/platform/ios/src/MGLAPIClient.m
@@ -107,8 +107,8 @@ static NSString * const MGLAPIClientHTTPMethodPost = @"POST";
}
- (void)loadCertificate:(NSData **)certificate withResource:(NSString *)resource {
- NSBundle *resourceBundle = [NSBundle mgl_frameworkBundle];
- NSString *cerPath = [resourceBundle pathForResource:resource ofType:@"der"];
+ NSBundle *frameworkBundle = [NSBundle mgl_frameworkBundle];
+ NSString *cerPath = [frameworkBundle pathForResource:resource ofType:@"der" inDirectory:frameworkBundle.mgl_resourcesDirectory];
if (cerPath != nil) {
*certificate = [NSData dataWithContentsOfFile:cerPath];
}
@@ -118,8 +118,8 @@ static NSString * const MGLAPIClientHTTPMethodPost = @"POST";
NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"];
NSString *appVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
NSString *appBuildNumber = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"];
- NSString *semanticVersion = [NSBundle mgl_frameworkBundle].infoDictionary[@"MGLSemanticVersionString"];
- NSString *shortVersion = [NSBundle mgl_frameworkBundle].infoDictionary[@"CFBundleShortVersionString"];
+ NSString *semanticVersion = [NSBundle mgl_frameworkInfoDictionary][@"MGLSemanticVersionString"];
+ NSString *shortVersion = [NSBundle mgl_frameworkInfoDictionary][@"CFBundleShortVersionString"];
NSString *sdkVersion = semanticVersion ? semanticVersion : shortVersion;
_userAgent = [NSString stringWithFormat:@"%@/%@/%@ %@/%@", appName, appVersion, appBuildNumber, MGLAPIClientUserAgentBase, sdkVersion];
}