多个GoogleService-Info支持 [英] multiple GoogleService-Info support
本文介绍了多个GoogleService-Info支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
只要使用[FIRApp configureWithOptions:]
pre $ N $ C $ N $ strBase =
#if STAGING
firebasePlist = [[NSBundle mainBundle] pathForResource:@GoogleService-Info-DEVofType:@plist];
#endif
FIROptions * options = [[FIROptions alloc] initWithContentsOfFile:firebasePlist];
[FIRApp configureWithOptions:options];
I registered my Dev and Prod schemes as different apps in Firebase. I want them to be separate, Each has unique bundle ID. I am using #if dev to identify if it is dev or prod scheme. How can I initialize firebase with a dedicated plist for for that scheme?
解决方案
Just use [FIRApp configureWithOptions:]
NSString *firebasePlist = [[NSBundle mainBundle] pathForResource:@"GoogleService-Info" ofType:@"plist"];
#if STAGING
firebasePlist = [[NSBundle mainBundle] pathForResource:@"GoogleService-Info-DEV" ofType:@"plist"];
#endif
FIROptions *options = [[FIROptions alloc] initWithContentsOfFile:firebasePlist];
[FIRApp configureWithOptions:options];
这篇关于多个GoogleService-Info支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文