不同的GoogleService-Info.plist文件适用于ios和android中的开发和产品
我正在使用google登录一个应用程序。我在后端安装了一个dev和一个prod google API项目 我想在我的react原生应用程序中使用单独的GoogleService-Info.plist for dev和prod不同的GoogleService-Info.plist文件适用于ios和android中的开发和产品,ios,react-native,react-native-android,react-native-ios,google-signin,Ios,React Native,React Native Android,React Native Ios,Google Signin,我正在使用google登录一个应用程序。我在后端安装了一个dev和一个prod google API项目 我想在我的react原生应用程序中使用单独的GoogleService-Info.plist for dev和prod 如何根据环境配置GoogleService-Info.plist?您需要根据环境进行配置 NSString *firebasePlist = [[NSBundle mainBundle] pathForResource:@"GoogleService-Info&q
如何根据环境配置GoogleService-Info.plist?您需要根据环境进行配置
NSString *firebasePlist = [[NSBundle mainBundle] pathForResource:@"GoogleService-Info" ofType:@"plist"];
#if DEV
firebasePlist = [[NSBundle mainBundle] pathForResource:@"GoogleService-Info-DEV" ofType:@"plist"];
#endif
FIROptions *options = [[FIROptions alloc] initWithContentsOfFile:firebasePlist];
[FIRApp configureWithOptions:options];
如果您已将项目配置为 不需要在代码中配置任何内容 对于ANDROID,默认情况下,您可以设置3个环境