diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-12-13 02:42:56 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-12-13 10:30:04 -0800 |
commit | 2d52dd8c0f964715d44ac51ec2491f24a9c8cb5a (patch) | |
tree | f83f2d223939f4d0296db2cfdf53b2d00c1458ea /platform/ios | |
parent | 9f4dd1c5f46ebc7915118d278f25b323c11c9b81 (diff) | |
download | qtlocation-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/ios')
-rw-r--r-- | platform/ios/app/MBXViewController.m | 2 |
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; |