XCFramework as Swift Package binary target "Cannot open file handle for file" error

73 Views Asked by At

I added a Swift package dependency to my Xcode project. Package contains a XCFramework binary target. Package resolutions works as expected. When I try to build the project, the process fails with following error:

Cannot open file handle for file at path: /.../DerivedData/.../SourcePackages/artifacts/.../MyFramework/MyFramework.xcframework/ios-arm64_x86_64-simulator/MyFramework.framework/MyFramework: The operation couldn’t be completed. (XCBUtil.BinaryReaderError error 0.)

I cannot find any information about XCBUtil.BinaryReaderError error 0. Could it be the framework size? It's ~850MB. I tried thinning it to just the x86_64 slice but still would not work.

XCFramework seems fine and works if I import it directly into the project or via CocoaPods.

Using Xcode 15.0.1.

0

There are 0 best solutions below