File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -156,8 +156,15 @@ +(nullable ILogger *)initializeLogManager:(nonnull NSString *)tenantToken withCo
156
156
// Obtain semantics values
157
157
NSBundle * bundle = [NSBundle mainBundle ];
158
158
NSLocale * locale = [NSLocale currentLocale ];
159
- std::string strUserLocale = std::string ([[locale languageCode ] UTF8String ]);
160
- NSString * countryCode = [locale countryCode ];
159
+ std::string strUserLocale;
160
+ NSString * countryCode = nil ;
161
+
162
+ if (@available (iOS 10.0 , macOS 10.12 , *))
163
+ {
164
+ strUserLocale = std::string ([[locale languageCode ] UTF8String ]);
165
+ countryCode = [locale countryCode ];
166
+ }
167
+
161
168
if ([countryCode length ] != 0 )
162
169
{
163
170
strUserLocale += [[NSString stringWithFormat: @" -%@ " , countryCode] UTF8String ];
You can’t perform that action at this time.
0 commit comments