Accent Color is broken in Xcode 27.1 RC 1

In Xcode 27.1 RC 1 there is a regression bug displaying incorrect accent color across the app. It worked correctly in Xcode 27.1 Beta 1. It affects borderPromintent top bar buttons and tab bars:

https://x.com/kulik_wojciech/status/2107252543709692166?s=20

I already reported it as a bug: FB25074768

I've found the bug! It turns out that accessing UIScreen.main here breaks accent color in the app 🤯!

I know UIScreen.main is deprecated, but I was using it as a fallback and since the window wasn't initialized yet, the fallback triggered causing this issue...

Thanks for the post, and looks like you already know about the deprecation of UIScreenmain at

https://developer.apple.com/documentation/uikit/uiscreen-deprecated-symbols

However, it looks like you filed a bug? May I ask the reason if you see the property has been deprecated?

I would suggest to view is actually attached to the window, or are you using UIApplication.shared.connectedScenes to safely fish out the UIWindowScene? You can check the scene instead? Good fallbacks are didMoveToWindow or onAppear in my opinion.

Hope this helps

Albert  WWDR

However, it looks like you filed a bug? May I ask the reason if you see the property has been deprecated?

I filled the bug before I figured out what's the root cause as you can clearly see by the order of posts.

Nevertheless, the deprecation doesn't mean that random things in the app should break, so the SDK bug remains valid.

@maxik Thanks for your answer and in the same train of thought have you tried to use the UIScene delegates?

Wish you luck on your filed bug.

Albert  WWDR

Accent Color is broken in Xcode 27.1 RC 1
 
 
Q