Posted at

Firebaseの本番/開発の環境 (plist) を分けたい

More than 1 year has passed since last update.

FIRAppをみていたら、設定できそうなオプションがあったので、こんな感じで。

#if DEBUG

NSString *filePath = [[NSBundle mainBundle] pathForResource:@"GoogleService-Info-dev" ofType:@"plist"];
FIROptions *options = [[FIROptions alloc] initWithContentsOfFile:filePath];
[FIRApp configureWithOptions:options];
#else
[FIRApp configure];
#endif