2
0
mirror of synced 2025-02-20 01:58:09 +00:00

[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 @return
*/ */
RCT_EXPORT_METHOD(setLanguageCode: RCT_EXPORT_METHOD(setLanguageCode:
(NSString *) appName (NSString *) appDisplayName
code: code:
(NSString *) code) { (NSString *) code) {
FIRApp *firApp = [FIRApp appNamed:appName]; FIRApp *firApp = [RNFirebaseUtil getApp:appDisplayName];
[FIRAuth authWithApp:firApp].languageCode = code; [FIRAuth authWithApp:firApp].languageCode = code;
} }
@ -943,8 +943,8 @@ RCT_EXPORT_METHOD(setLanguageCode:
@return @return
*/ */
RCT_EXPORT_METHOD(useDeviceLanguage: RCT_EXPORT_METHOD(useDeviceLanguage:
(NSString *) appName) { (NSString *) appDisplayName) {
FIRApp *firApp = [FIRApp appNamed:appName]; FIRApp *firApp = [RNFirebaseUtil getApp:appDisplayName];
[[FIRAuth authWithApp:firApp] useAppLanguage]; [[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')); 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() { useDeviceLanguage() {
throw new Error(INTERNALS.STRINGS.ERROR_UNSUPPORTED_MODULE_METHOD('auth', 'useDeviceLanguage')); throw new Error(INTERNALS.STRINGS.ERROR_UNSUPPORTED_MODULE_METHOD('auth', 'useDeviceLanguage'));
} }