我的图书馆不能使用Swift包管理器

时间:2023-01-24 07:35:09

I have an open source Swift camera framework called Lumina, and I would like to be able to use it with all three main iOS dependency management systems. (Cocoapods and Carthage work fine.)

我有一个名为Lumina的开源快速相机框架,我希望能够将它与所有三个主要的iOS依赖管理系统一起使用。(可可粉和迦太基都很好用。)

All of my tags follow semantic versioning rules, but the titles have the letter "v" before them, like so:

我所有的标签都遵循语义版本规则,但是标题前面有字母“v”,比如:

我的图书馆不能使用Swift包管理器

For the library, the manifest Package.swift file reads like so:

对于库,清单包。swift文件的内容如下:

import PackageDescription

let package = Package(
    name: "Lumina")

In another project, I wanted to test that SPM works and uses the latest version of my framework (currently v0.8.4). I created a Single View Application in Xcode 9.0 from scratch, and added the following Package.swift file to the root directory:

在另一个项目中,我想测试SPM是否有效,并使用我的框架的最新版本(目前是v0.8.4)。我从头开始在Xcode 9.0中创建了一个视图应用程序,并添加了以下包。swift文件到根目录:

import PackageDescription

let package = Package(
    name: "SwiftPMLumina",
    targets: [],
    dependencies: [
        .Package(url: "https://github.com/dokun1/Lumina.git", majorVersion: 0, minor: 8)
    ]
)

When I do this, the CLI says error: unsatisfiable I have also tried not specifying a minor version, and specifying a specific version string (such as "v0.8.4") to no avail.

当我这样做的时候,CLI说:error: unsatisatable,我还尝试过不指定次要版本,并指定一个特定的版本字符串(如“v0.8.4”),但没有效果。

What do I have to do to properly build this library with SwiftPM, and/or what support do I have to add to the library itself?

我需要做什么才能正确地使用SwiftPM构建这个库,以及/或我需要向库本身添加什么支持?

1 个解决方案

#1


1  

Just add tags without initial "v" to your framework, like "0.8.4".

只需在框架中添加没有初始“v”的标记,比如“0.8.4”。

#1


1  

Just add tags without initial "v" to your framework, like "0.8.4".

只需在框架中添加没有初始“v”的标记,比如“0.8.4”。