[ios] Fixed crash on launch in iosapp
Use NSLocaleLanguageCode instead of -[NSLocale languageCode], which is newer than the minimum deployment target.
This commit is contained in:
committed by
Minh Nguyễn
parent
9f4dd1c5f4
commit
2d52dd8c0f
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user