Search code examples
iosfirebasefirebase-test-lab

How to detect app running in Firebase Test Lab on iOS?


A previous question answered this for android: by checking for firebase.test.lab System.Settings.

But how to detect running inside the firebase test lab in an iOS app? I did not find anything similar for iOS in the test lab documentation.


Solution

  • The recommended way to check that you're running in Firebase Test Lab is to send your own environment variable when you initiate a test. In iOS, there isn't an equivalent to Android's System/Global/Secure settings.

    You may either set up the environment variable in your scheme, or modify your .xctestrun file by hand.