This question is similar to
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.