Skip to content

mlx-swift 0.30.2 pin fails to build with Xcode 26 / iOS 26 SDK #30

Description

@benkruger

Problem

kokoro-ios pins mlx-swift to exact: "0.30.2" in Package.swift. This version has undefined symbols when building against the iOS 26.2 SDK (Xcode 26):

Undefined symbols for architecture arm64:
  "_MTLIOErrorDomain", referenced from:
      ___cxx_global_var_init.3775 in device-....o
  "_MTLTensorDomain", referenced from:
      ___cxx_global_var_init.3746 in device-....o
ld: symbol(s) not found for architecture arm64

Fix

This was fixed in mlx-swift 0.30.6 via ml-explore/mlx-swift#354 ("Weakly link error domains to allow building non-Metal-supporting targets").

Bumping the pin from exact: "0.30.2" to exact: "0.30.6" (or from: "0.30.6") resolves the build failure.

Secondary issue

The resource path .copy("../../Resources/") in Package.swift creates resource bundles that fail codesign when consumed as a remote SPM dependency:

KokoroSwift_KokoroSwift.bundle: bundle format unrecognized, invalid, or unsuitable

Environment

  • Xcode 26.2 (Swift 6.2.4)
  • iOS Simulator 26.2 SDK
  • Apple Silicon (arm64)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions