I'm trying to create a swift package from existing xcframework. I can add it to my test app but I get that error: "Cannot open file handle for file at path: Path(str: "... .framework")" when I'm trying to compile the app. It happens for both device and simulator.
This is my Package.swift file:
// swift-tools-version: 5.6
import PackageDescription
let package = Package(
name: "MyFramework",
platforms: [
.iOS(.v10)
],
products: [
.library(name: "MyFramework", targets: ["MyFramework"]),
],
targets: [
.binaryTarget(name: "MyFramework", path: "MyFramework.xcframework")
]
)
I can see that the xcframework do exist along the Package.swift in the same directory.
Does anyone know what's wrong here?
The issue was a wrong values in the plist file inside each framework for each architecture. CFBundleName and CFBundleExecutable were not equal to the name in the Package.swift file.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.