Use different GoogleService-Info.plist for different build schemes

后端 未结 17 740
梦毁少年i
梦毁少年i 2020-12-07 07:49

I am using a build scheme for prod and one for staging (with 2 different bundle identifiers) and I am trying to use a separate GoogleService-Info.plist for each scheme. Is t

17条回答
  •  旧巷少年郎
    2020-12-07 08:42

    I think you can use this way to configure your GoogleService-Info.plist dynamicly and use different names for different bundle identifiers.

    ciao Andreas

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

提交回复
热议问题