0

This question is similar to

Swift Version Conflict

The only difference is the configuration below

Xcode 14.2 (Swift compiler 5.7.2) iOS Deployment target 16.2 Build library for distribution YES

I have updated my swift version on my package

// swift-tools-version: 5.7.1
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "SmileIDentity",
    platforms: [.iOS(.v16)],
    products: [
        // Products define the executables and libraries a package produces, and make them visible to other packages.
        .library(
            name: "SmileIDentity",
            targets: ["SmileIDentity", "Smile_Identity_SDK"]),
    ],
    dependencies: [
        // Dependencies declare other packages that this package depends on.
        // .package(url: /* package url */, from: "1.0.0"),
    ],
    targets: [
        .target(
            name: "SmileIDentity",
            dependencies: []),
        .binaryTarget(name: "Smile_Identity_SDK", path: "./Smile_Identity_SDK.xcframework"),
        .testTarget(
            name: "SmileIDentityTests",
            dependencies: ["SmileIDentity"]),
        
    ]
)

But I get the error

Failed to build module 'Smile_Identity_SDK'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51)', while this compiler is 'Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)'). Please select a toolchain which matches the SDK.
Dávid Pásztor
  • 51,403
  • 9
  • 85
  • 116
Darotudeen
  • 1,914
  • 4
  • 21
  • 36
  • Not your fault. The developers of `Smile_Identity_SDK` need to learn to build their packages properly for distribution (here's what in a nutshel they should do: https://stackoverflow.com/a/58656323/5318223). All you can do is either ask them for new version that supports this version you want, or use the version they created their SDK with. – timbre timbre Mar 17 '23 at 18:00

0 Answers0