Disable Google Analytics in iOS simulator

google-analytics, ios

Solution

Simple, this is taken straight from the Google Analytics webpage :

[[GAI sharedInstance] setDryRun:YES];

Dry Run : The SDK provides a dryRun flag that when set, prevents any data from being sent to Google Analytics. The dryRun flag should be set whenever you are testing or debugging an implementation and do not want test data to appear in your Google Analytics reports.

Hope this helps

Problem

Google Analytics is running in the iOS simulator. This causes pollution in the console log which I can be looking for useful debugging information. Also, the data sent to Google is not indicative of an actual user using our app. How can I disable the Google Analytics reporting just while running the app in iOS simulator?

Original source

Related problems