10

I am able to use both Google SignIn and Analytics using GoogleService-Info.plist.

However, to reduce dependency, I want to move the information from the GoogleService-Info.plist into another .plist that contains my other information.

Would this be possible? If so, how can I do this?

Bebekucing
  • 383
  • 4
  • 12
  • DI is our everything :) For now, due to my researching - we could not change the name, or make google SDK read from what we want. So I came up to [the next solution](http://stackoverflow.com/a/33336418/1040347) – Aleksey Potapov Oct 25 '15 at 23:58

2 Answers2

5

You can - both libraries allow you to configure them manually. You'll want to drop any references to GGLContext, and just setup the libraries directly:

[GIDSignIn sharedInstance].clientID = @"YOUR_CLIENT_ID";

and

[[GAI sharedInstance] trackerWithTrackingId:@"UA-XXXX-Y"]; 

You can check the reference docs for Analytics and Sign In for more.

Ian Barber
  • 19,765
  • 3
  • 58
  • 58
0

Sure you can. Do not initialise through pList , use instead manual setup using your keys and constants maintained in separate space in your project.

[[[GAI sharedInstance] logger] setLogLevel:kGAILogLevelVerbose];
 id newTracker = [[GAI sharedInstance] trackerWithTrackingId:GOOGLE_ANALYTICS_KEY];
[GAI sharedInstance].defaultTracker = newTracker;
sashi_bhushan
  • 394
  • 3
  • 16