'Firebase Analytics (iOS): How to deactivate the logging of events when running an app in the Xcode simulator?

I have been spending some time now, trying to figure out, how to deactivate the logging of events in Firebase Analytics for iOS when running an app in the Xcode simulator.

Currently I have set Firebase up as described in Googles documentation. The issue is that Firebase Analytics seems to log events even when I run my app on Simulator/test device from Xcode. This messes with the statistics that I would see in the Firebase console.

Can anyone help me out with information on how to prevent this behavior?

Thanks in advance!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source