Commit 91efac42 authored by Deployer's avatar Deployer

Fixed languageCode issue on iOS 9 or lower

parent 90be2393
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'CedarMaps' s.name = 'CedarMaps'
s.version = '2.0.2' s.version = '2.1.1'
s.summary = 'CedarMaps iOS SDK' s.summary = 'CedarMaps iOS SDK'
# This description is used to generate tags and improve search results. # This description is used to generate tags and improve search results.
......
...@@ -339,8 +339,16 @@ typedef enum { ...@@ -339,8 +339,16 @@ typedef enum {
if (pointsStr.length > 0) { if (pointsStr.length > 0) {
urlStr = [urlStr stringByAppendingString:pointsStr]; urlStr = [urlStr stringByAppendingString:pointsStr];
} }
if (locale.languageCode) {
urlStr = [urlStr stringByAppendingFormat:@"?instructions=%@&locale=%@", shouldGetInstructions ? @"true" : @"false", locale.languageCode]; NSString *languageCode;
if (@available(iOS 10, *)) {
languageCode = locale.languageCode;
} else {
languageCode = [locale objectForKey:NSLocaleLanguageCode]
}
if (languageCode) {
urlStr = [urlStr stringByAppendingFormat:@"?instructions=%@&locale=%@", shouldGetInstructions ? @"true" : @"false", languageCode];
} }
__weak CSMapKit *weakSelf = self; __weak CSMapKit *weakSelf = self;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment