如何在Swift Package Manager库中包含资源/资源?

时间:2023-01-23 23:53:21

I would like to ship my library using Apple's Swift Package Manager. However my lib includes a .bundle file with several strings translated in different languages. Using cocoapods, I can include it using spec.resource. But in SwiftPM, I cannot do it. Any solution?

我想使用Apple的Swift Package Manager运送我的库。但是我的lib包含一个.bundle文件,其中包含多个用不同语言翻译的字符串。使用cocoapods,我可以使用spec.resource包含它。但是在SwiftPM中,我不能这样做。有解决方案吗

1 个解决方案

#1


18  

The package manager does not yet have any definition for how resources will be bundled with targets. We are aware of the need for this, but don't yet have a concrete proposal for it. I filed https://bugs.swift.org/browse/SR-2866 to ensure we have a bug tracking this.

包管理器还没有关于如何将资源与目标捆绑在一起的任何定义。我们意识到需要这样做,但尚未提出具体建议。我提交了https://bugs.swift.org/browse/SR-2866以确保我们有一个跟踪此错误的错误。

#1


18  

The package manager does not yet have any definition for how resources will be bundled with targets. We are aware of the need for this, but don't yet have a concrete proposal for it. I filed https://bugs.swift.org/browse/SR-2866 to ensure we have a bug tracking this.

包管理器还没有关于如何将资源与目标捆绑在一起的任何定义。我们意识到需要这样做,但尚未提出具体建议。我提交了https://bugs.swift.org/browse/SR-2866以确保我们有一个跟踪此错误的错误。