From 2d52dd8c0f964715d44ac51ec2491f24a9c8cb5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Tue, 13 Dec 2016 02:42:56 -0800 Subject: [ios] Fixed crash on launch in iosapp Use NSLocaleLanguageCode instead of -[NSLocale languageCode], which is newer than the minimum deployment target. --- platform/ios/app/MBXViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.1