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: https://gist.github.com/viktorbenei/c6d4fe1e68de739dbb5f4f15de76b9db

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