[auth][ios] Add app language constants
This commit is contained in:
parent
0083ef7a66
commit
c736a6bb51
|
@ -1166,6 +1166,25 @@ RCT_EXPORT_METHOD(useDeviceLanguage:
|
||||||
return output;
|
return output;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* React native constant exports - exports native firebase apps mainly
|
||||||
|
* @return NSDictionary
|
||||||
|
*/
|
||||||
|
- (NSDictionary *)constantsToExport {
|
||||||
|
NSMutableDictionary *constants = [NSMutableDictionary new];
|
||||||
|
NSDictionary *firApps = [FIRApp allApps];
|
||||||
|
NSMutableDictionary *appLanguage = [NSMutableDictionary new];
|
||||||
|
|
||||||
|
for (id key in firApps) {
|
||||||
|
FIRApp *firApp = firApps[key];
|
||||||
|
|
||||||
|
appLanguage[firApp.name] = [FIRAuth authWithApp:firApp].languageCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
constants[@"APP_LANGUAGE"] = appLanguage;
|
||||||
|
return constants;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Converts a FIRUser instance into a dictionary to send via RNBridge
|
Converts a FIRUser instance into a dictionary to send via RNBridge
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue