iOS UnitTest fails on Bitrise when checking applicationState

I have a unit test that is failing only in Bitrise. It works if I use xcodebuild or if I run directly from Xcode.

I placed a bunch of logs and it seems that UIApplication.shared.applicationState == .active is false when running in bitrise causing the test to fail.

What could be the cause of this?

Hi @valleyman86,

I’d suggest you to Remote Desktop / VNC into the build machine and run the tests there:

Let us know how it goes or if you’d need additional assistance! :wink: