Skip to content

Traits Support in Xcode 26.2 : an update and observations about building chat-ui-swift without the AnyLanguageModel shim #78

@SpiraMira

Description

@SpiraMira

So, I was trying to build chat-ui-swift, and the out-of-the-box clone of its repository imports this module, but the initial build failed. The Issues section is not available, so I am posting this here since it’s directly related.

TL;DR - I have a project setup that imports AnyLanguageModel directly without the local HuggingChatKit shim.

The README currently advises that a shim is necessary since traits support is still missing in Xcode 26.x. So chat-ui-swift imports (local) HuggingChatKit to perform this magic. Didn’t work for me since importing HuggingChatKit chokes on importing swift-collections for some reason (your mileage may vary - it’s not consistent)

step 1 : remove all existing packages - don’t forget the nagging module in the libraries section in the HuggingChat Target module’s General section

step 2: import mlx-swift-lm ( main branch)

step 3: now import AnyLanguageModel

step 4: Bob’s your Uncle

Only question remaining: aren’t traits running just fine, or am I still missing something ?

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