When Running Unitests on ios15 simulator it gets stuck on UIKit function

Unitests (cmd+U) on xcode13 on a ios15 simulator are getting stuck and won't executes XCtests.

I've debugged the code and found that it gets stuck on the line: [UIScreen mainScreen] , and won't continue to the next line in my code. It doesn't happen when running the unitests on ios14 simulator, nor when simply running the app (cmd+R) on a ios15 simulator.

The UIScreen is part of the UIKIt. Is there a bug in the UIKIt?

Could you show more code, the full func with the line: [UIScreen mainScreen] ?

The full line is: extern const int WINDOW_WIDTH = [[UIScreen mainScreen] bounds].size.height * [[UIScreen mainScreen] scale];

When Running Unitests on ios15 simulator it gets stuck on UIKit function
 
 
Q