admin管理员组文章数量:1122846
I have a mono cocoapods repo, that host all our libraries. I'm in the process of adding support for Apple SPM. Everything is working on the package.swift configuration. But, I trying to have the same behavior as Firebase SPM package.
The behavior is when a someone want to add our packages, all the package are optional and with the "add to target" set to none in Xcode, to offer full control on what the user want to import (See image). Any idea on what am I missing ?
Firebase adding process
I've tried having target wrappers, a dummy empty package with no dependencies as the main product, but nothing seems to be working
Here's a obfuscated package.swift
// swift-tools-version: 5.9
import PackageDescription
let package = Package(
name: "MyPackages",
platforms: [.iOS(.v13)],
products: [
.library(
name: "MyPackageA",
targets: ["MyPackageA"]
),
.library(
name: "MyPackageB",
targets: ["MyPackageB"]
)
],
dependencies: [
],
targets: [
.target(
name: "MyPackageA",
dependencies: ["MyCorePackageBinary", "MyPackageABinary"],
path: "MyPackageAPath"
),
.target(
name: "MyPackageB",
dependencies: ["MyCorePackageBinary", "MyPackageBBinary"],
path: "MyPackageBPath"
),
.binaryTarget(
name: "MyCorePackageBinary",
path: "MyPath/MyCorePackageBinary.xcframework"
),
.binaryTarget(
name: "MyPackageABinary",
path: "MyPathA/MyPackageABinary.xcframework"
),
.binaryTarget(
name: "MyPackageBBinary",
path: "MyPathB/MyPackageBBinary.xcframework"
)
]
)
本文标签: xcodeHow can I make all my Swift Package Manager package optional like Firebase offersStack Overflow
版权声明:本文标题:xcode - How can I make all my Swift Package Manager package optional like Firebase offers - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736307215a1933234.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论