Xcode 26 deprecation warnings in ZDKUIUtil.h | Community
Skip to main content

Xcode 26 deprecation warnings in ZDKUIUtil.h

  • October 17, 2025
  • 2 replies
  • 0 views

Marcos14

Our project is quite large, so we use "treat warnings as errors" to keep the codebase as clean as possible. During our recent upgrade to Xcode 26, we noticed that some dependencies such as ZendeskSupportSDK (9.0.0) are emitting deprecation warnings like the following:

 

'mainScreen' is deprecated: first deprecated in iOS 26.0 - Use a UIScreen instance found through context instead (i.e, view.window.windowScene.screen), or for properties like UIScreen.scale with trait equivalents, use a traitCollection found through context.

 

We tried moving the `ZendeskSupportSDK` dependency into its own target with warnings-as-errors disabled. Unfortunately, that doesn’t seem to work, because the SDK is treated as an explicitly precompiled module. As a result, it is compiled before the rest of the project and still picks up the main app target’s treat warnings as errors setting.

 

We're wondering if there is a way for the dependency to either 1) move away from using UIScreen.main altogether or 2) suppress warnings from ZendeskSupportSDK?


Thanks so much!

2 replies

Marcos14
  • Author
  • October 17, 2025

It looks like this was also an issue with `statusBarOrientation` back in 6.0.0. I've made a PR targeting the iOS SDK with the changes required here.

 

For now, our project will likely use our fork with the changes, until an official release is made by the Zendesk mobile team.  


Greg29
  • October 20, 2025

Hi Marcos! Our devs are aware of this and have added it to their backlog. To be honest, it's currently a low priority, but I completely understand the “treat warnings as errors” nature that you're dealing with, so I'll bring this up to them to see if I can get some more traction on it. I'll go ahead and create a private ticket for you and attach it to the problem ticket so that we can provide updates directly to you.