We're building an SDK, shipped as binary.
Context:
To test a pre-release of the SDK, we import it into a client project located in another repo. Since the SDK isn't released yet, we want to integrate it into the client project as a local swift package.
Steps:
- We created a package with the following contents of Package.swift:
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "our-sdk-package",
platforms: [
.iOS(.v11)
],
products: [
.library(
name: "OurSDK",
targets: ["OurSDK"]),
],
targets: [
.binaryTarget(name: "OurSDK",
url: "https://place.where/sdk/resides/OurSDK.zip",
checksum: "17bd37319985946f596baffb2ca778f4a3b573a39391cae5a874a2f11bc558a6")
// .binaryTarget(name: "OurSDK", path: "OurSDK.xcframework")
]
)
- As you can see we tried with 2 versions, both using a url where our CI uploads the SDK (this is the ideal approach for us), or, copying the xcxframework in the same folder as the Package.swift file.
- We dragged the swift package into the client Xcode project. SPM downloaded the binary ok (we could see that in the Xcode logs).
Problem:
When we try to add the xcframework as a dependency in the Xcode Target Settings, under Frameworks, Libraries etc, by tapping on the + sign, the xcframework (and the package) doesn't appear in that dialog.
Are we doing something wrong or is this scenario not supported?