# Failed to build module 'MyFrameworkA'; this SDK is not supported by the compiler

**URL:** <https://forums.swift.org/t/failed-to-build-module-myframeworka-this-sdk-is-not-supported-by-the-compiler/80485>\
**Category:** Package Manager\
**Tags:** xcframework\
**Created:** [June 16, 2025, 12:08pm UTC](https://forums.swift.org/t/failed-to-build-module-myframeworka-this-sdk-is-not-supported-by-the-compiler/80485 "2025-06-16T12:08:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![W-Vandenputte\_medpace](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/w-vandenputte_medpace/32/41281_2.png) [@W-Vandenputte\_medpace](https://forums.swift.org/u/W-Vandenputte_medpace)\
**Post date:** [June 16, 2025, 12:08pm UTC](https://forums.swift.org/t/failed-to-build-module-myframeworka-this-sdk-is-not-supported-by-the-compiler/80485/1 "2025-06-16T12:08:10Z")

</div>

I am importing third party .xcframeworks in a capacitor plugin. I am using the Swift Package Manager to include these frameworks in the following manner in my Package.swift file.

```swift
// swift-tools-version: 5.9
import PackageDescription

let package = Package(
    name: "MyPlugin",
    platforms: [.iOS(.v14)],
    products: [
        .library(
            name: "MyPlugin",
            targets: ["MyPlugin"])
    ],
    dependencies: [
        .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0")
    ],
    targets: [
        .target(
            name: "MyPlugin",
            dependencies: [
                .product(name: "Capacitor", package: "capacitor-swift-pm"),
                .product(name: "Cordova", package: "capacitor-swift-pm"),
                "MyFrameworkA",
                "MyFrameworkB"
            ],
            path: "ios/Sources/MyPlugin"),
        .testTarget(
            name: "MyPluginTests",
            dependencies: ["MyPlugin"],
            path: "ios/Tests/MyPluginTests"),
        .binaryTarget(
              name: "MyFrameworkA",
              path: "./ios/Frameworks/MyFrameworkA"),
        .binaryTarget(
            name: "MyFrameworkB",
            path: "./ios/Frameworks/MyFrameworkB")
    ]
)

```

When I now go into iOS/sources/MyPlugin/My.swift

and I do

```swift
import MyFrameworkA

```

or

```swift
@_implementationOnly import MyFrameworkA

```

then I get this error:

> Failed to build module 'MyFrameworkA'; this SDK is not supported by the compiler
> 
> (the SDK is built with 'Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)', while this compiler is 'Apple Swift version 6.1.2 effective-5.10 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)').
> 
> Please select a toolchain which matches the SDK.

What can I do against this? Why should this even be an issue that a third party dependency was compiled in slightly different version? I do not even have a .xcproj or .xcworkspace file in my capacitor plugin to define any toolchain / swift lang version.

I am running the latest Xcode 16.4 (16F6)

Same problem for `MyFrameworkB` but with a slightly different version in the error.

---

<div class="post-metadata">

**Author:** ![allevato](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/allevato/32/385_2.png) [@allevato](https://forums.swift.org/u/allevato)\
**Post date:** [June 16, 2025, 12:16pm UTC](https://forums.swift.org/t/failed-to-build-module-myframeworka-this-sdk-is-not-supported-by-the-compiler/80485/2 "2025-06-16T12:16:27Z")

</div>

Are there any other errors in the build log before that one?

In my experience, the "SDK is built with 'X' while this compiler is 'Y'" is a catch-all error that gets emitted at the end when the compiler fails for some other reason trying to load a textual module interface. Unfortunately that error is sort of misleading (an SDK built for an older compiler should definitely be compatible with a newer compiler, or the whole compatibility story would be broken), but you may need to go scraping the logs more to find the actual error.

---

<div class="post-metadata">

**Author:** ![W-Vandenputte\_medpace](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/w-vandenputte_medpace/32/41281_2.png) [@W-Vandenputte\_medpace](https://forums.swift.org/u/W-Vandenputte_medpace)\
**Post date:** [June 16, 2025, 12:21pm UTC](https://forums.swift.org/t/failed-to-build-module-myframeworka-this-sdk-is-not-supported-by-the-compiler/80485/3 "2025-06-16T12:21:22Z")

</div>

The error pops up in 2 places

1. the editor on the same line as the import
2. in the Issues tab of the navigator. It is the only error here

This error pops up immediately after writing the `import`, I did not even press some build button
