Does it have to be an XCFramework?

We currently have some pre-built C libraries (that we build and distribute ourselves) linked into our project as .a files. The xcode project file allows use to do this linking... does the new .binaryTarget(... allow use to zip together the headers and .a files for use in other packages locally. If so is there an expected structure or method to do so?
Answered by Developer Tools Engineer in 613899022
Binary targets only support XCFrameworks, but those can contain either a framework or a library. You can point to your library and the headers directory with the corresponding arguments:

Code Block
xcodebuild -create-xcframework [-help] [-framework <path>] [-library <path> [-headers <path>]] -output <path>


The resulting XCFramework can then be used in a Swift package.
Accepted Answer
Binary targets only support XCFrameworks, but those can contain either a framework or a library. You can point to your library and the headers directory with the corresponding arguments:

Code Block
xcodebuild -create-xcframework [-help] [-framework <path>] [-library <path> [-headers <path>]] -output <path>


The resulting XCFramework can then be used in a Swift package.
Does it have to be an XCFramework?
 
 
Q