Created
December 30, 2017 15:51
-
-
Save jugutier/dc016494f43fd9412aa8c7700b25d3a3 to your computer and use it in GitHub Desktop.
How to set FIRAnalyticsDebugEnabled WITHOUT launch arguments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UserDefaults.standard.set("1", forKey: "/google/measurement/debug_mode") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is an implementation detail which may change by google at any point. Launch Argument values are converted to preferences in user default at runtime. (Read more here)
In addition to that it seems like google maps from
FIRAnalyticsDebugEnabled
to/google/measurement/debug_mode
at some point in the build process. I figured that out by dumping the user defaults with and without the launch argument with the following code:Why go through all this? Because most CI/deploy build systems don't support passing runtime argument values and the alternative is to figure out how to do it in the command line for
xcodebuild
command. Instead, by adding this to you track code conditionalized on the way you use to determine the environment of your liking.