-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessing UIScreen.mainScreen in +load results in deadlock while injecting test bundle in Xcode 16 #56
Comments
I shared this issue on the Apple Dev Forums: https://developer.apple.com/forums/thread/762078 The recommendation is that we should update this to avoid using UIKit prior to |
Here's my fix: https://github.com/happybits/STULabel/blob/eded97a3db8e4b104848aebe33c8e9121ab174d1/STULabel/STUMainScreenProperties.m#L60 I lazy-load on first access of the exported If that solution looks appealing then I'd happily open a PR, just let me know. |
sounds promising. could you go ahead and open the PR so we can see the diff more easily? |
@macdrevx done! |
@macdrevx Thank you for reporting this issue! Did you already get any reply from Apple on the feedback issue, other than the forum reply? Are you aware of any documentation implying that UIKit methods can't be called prior to main? |
@stephan-tolksdorf the reply on the forums is the only one I received. I'm not aware of any statement in the docs about using UIKit prior to main. |
@stephan-tolksdorf looks like you received a reply from Apple on the forums post: https://developer.apple.com/forums//thread/762078?answerId=802399022#802399022 |
Also filed with Apple as FB14703057 (Deadlock in UIKit while injecting test bundle).
Steps to repro:
Actual behavior:
Tests fail to launch due to deadlock
Expected behavior:
Tests run
--
Deadlock occurs inside of the
UIScreen.mainScreen
access initiated by+load
added in the category on UIScreen.The text was updated successfully, but these errors were encountered: