Reputation: 2599
According to Google's documentation (Analytics for iOS), they want you to download some auto-generated .plist file to configure your app. Unfortunately, I have multiple report suites (Debug, Release) and need to switch dynamically depending on the build. So I'm trying to do one of two things:
-OR-
How have you dynamically instructed your app to send to different report suites depending on whether your app is Debug or Release?
Upvotes: 5
Views: 2471
Reputation: 324
Run into the same issue. My solution was to create separate build targets for QA and production, use pre-processor macros for target specific settings in code and 2 separate plist files for stuff like facebook app ID, bundle IDs (you can specify which plist file build target is using on Info tab of the project settings).
Same thing with GA - 2 plist files for each target, and to avoid naming conflict (because if you change plist name from GoogleService-Info, the app will crash) - simply put your QA plist in separate folder, it will still work just fine from there.
Don't mess with target memberships for you plists :)
Upvotes: 0
Reputation: 394
You should be able to ditch the .plist file and setting it up like so:
#import "GAI.h"
...
GAI *gai = [GAI sharedInstance];
[gai trackerWithTrackingId:@"your GA id"];
gai.trackUncaughtExceptions = YES; // optional
gai.logger.logLevel = kGAILogLevelVerbose; // optional - remove for release
Don't use the GGLContext stuff since that's trying to get parameters from the -plist file.
Upvotes: 8