[auth] Update iOS methods to internals change

This commit is contained in:
Elliot Hesp 2018-01-08 10:07:15 +00:00
parent fbc97bc2c8
commit 409cd70ab1
2 changed files with 5 additions and 4 deletions

View File

@ -928,10 +928,10 @@ RCT_EXPORT_METHOD(fetchProvidersForEmail:
@return
*/
RCT_EXPORT_METHOD(setLanguageCode:
(NSString *) appName
(NSString *) appDisplayName
code:
(NSString *) code) {
FIRApp *firApp = [FIRApp appNamed:appName];
FIRApp *firApp = [RNFirebaseUtil getApp:appDisplayName];
[FIRAuth authWithApp:firApp].languageCode = code;
}
@ -943,8 +943,8 @@ RCT_EXPORT_METHOD(setLanguageCode:
@return
*/
RCT_EXPORT_METHOD(useDeviceLanguage:
(NSString *) appName) {
FIRApp *firApp = [FIRApp appNamed:appName];
(NSString *) appDisplayName) {
FIRApp *firApp = [RNFirebaseUtil getApp:appDisplayName];
[[FIRAuth authWithApp:firApp] useAppLanguage];
}

View File

@ -385,6 +385,7 @@ export default class Auth extends ModuleBase {
throw new Error(INTERNALS.STRINGS.ERROR_UNSUPPORTED_MODULE_METHOD('auth', 'signInWithRedirect'));
}
// firebase issue - https://github.com/invertase/react-native-firebase/pull/655#issuecomment-349904680
useDeviceLanguage() {
throw new Error(INTERNALS.STRINGS.ERROR_UNSUPPORTED_MODULE_METHOD('auth', 'useDeviceLanguage'));
}