dimanche 12 juin 2016

How to set a different app config for Firebase in xcode?


New to using Firebase.

I also have a single project/workspace with multiple app Targets.

In Firebase, I setup a project in the console, and added my two app's to the project. The thing is, each app in Firebase spits out a config file that has the same name (GoogleService-Info.plist).

So... do I just need to rename one of them to something like GoogleService-InfoLite.plist or GoogleService-InfoFull.plist? Something along those lines. Or does the file HAVE to retain it's original name?

My targets share lots of files between them (including the AppDelegate). The only thing I've seen as far as setup is concerned is to include the .plist file in the project, and then the two line additions for the @import and [FIRApp configure];?

@import Firebase;

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

  [FIRApp configure];

  return YES;
}

Am I missing something completely obvious here? Or would it be best to have these split into separate projects with a single target each?

Thanks in advance.

UPDATE: Thanks @Shubhank. I'm aware of the Target Membership in File Inspector but I didn't think that applied to the .plist files as the others ones (like Info.plist) did not have any targets selected.

Perhaps this is where I am wrong... :-/

In the event that Firebase does need to retain that exact file name, I suppose I could always put them in different sub-directories in the file system.


Aucun commentaire:

Enregistrer un commentaire