summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-12-13 02:42:56 -0800
committerMinh Nguyễn <mxn@1ec5.org>2016-12-13 10:30:04 -0800
commit2d52dd8c0f964715d44ac51ec2491f24a9c8cb5a (patch)
treef83f2d223939f4d0296db2cfdf53b2d00c1458ea /platform
parent9f4dd1c5f46ebc7915118d278f25b323c11c9b81 (diff)
downloadqtlocation-mapboxgl-2d52dd8c0f964715d44ac51ec2491f24a9c8cb5a.tar.gz
[ios] Fixed crash on launch in iosapp
Use NSLocaleLanguageCode instead of -[NSLocale languageCode], which is newer than the minimum deployment target.
Diffstat (limited to 'platform')
-rw-r--r--platform/ios/app/MBXViewController.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m
index 12b700049c..7f3799ebdd 100644
--- a/platform/ios/app/MBXViewController.m
+++ b/platform/ios/app/MBXViewController.m
@@ -1210,7 +1210,7 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) {
NSString *bestLanguage;
for (NSString *language in preferredLanguages) {
- NSString *thisLanguage = [NSLocale localeWithLocaleIdentifier:language].languageCode;
+ NSString *thisLanguage = [[NSLocale localeWithLocaleIdentifier:language] objectForKey:NSLocaleLanguageCode];
if ([supportedLanguages containsObject:thisLanguage]) {
bestLanguage = thisLanguage;
break;