Skip to content

Build error on Xcode 26 / watchOS: 'UITraitCollection' is unavailable #11

@tpian928

Description

@tpian928

Hi, after upgrading to Xcode 26, I encountered a build error targeting watchOS:

.../SourcePackages/checkouts/SDWebImage/SDWebImage/Core/SDAnimatedImage.h:80:139: 'UITraitCollection' is unavailable: not available on watchOS 

This issue seems to be caused by references to UITraitCollection, which isn't available on watchOS. It builds fine on Xcode 16.4.

Reproduction:

Target platform: watchOS
Xcode version: Xcode 26 beta
Using Swift Package Manager

Suggestion:

Maybe wrap the relevant code in #if TARGET_OS_IOS || TARGET_OS_TV or similar platform availability checks?

Thanks for the awesome work on this project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions