TrueTime.swift
TrueTime.swift copied to clipboard
SwiftPM manifest file
Hello,
is it possible to add a package description file for Swift Package Manager?
I've done something similar:
// swift-tools-version:5.1
import PackageDescription
let package = Package(
name: "TrueTime",
products: [
.library(
name: "TrueTime-iOS",
targets: ["TrueTime-iOS"]
),
.library(
name: "TrueTime-Mac",
targets: ["TrueTime-Mac"]
),
.library(
name: "TrueTime-tvOS",
targets: ["TrueTime-tvOS"]
)
],
dependencies: [
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
.target(
name: "TrueTime-iOS",
dependencies: [],
path: "Sources"
),
.target(
name: "TrueTime-Mac",
dependencies: [],
path: "Sources"
),
.target(
name: "TrueTime-tvOS",
dependencies: [],
path: "Sources"
)
]
)
but it's only the first step since there are also the C files to put into an include directory where Xcode can find them.
Is there any plan to support this?
+1 I'd like to use TrueTime.swift in a package I'm working on, and I need SPM support as well.
bump +1
I have package manager support on my fork https://github.com/jay18001/TrueTime.swift/
Is there any reason why there is no Swift PM support yet?
@jay18001 I couldn't get your fork to work. I get the error: "https://github.com/jay18001/TrueTime.swift/ has no Package.swift manifest for version 5.1.0"
Hi @nobinajohan,
You have to use the commit hash -> 80f4900a6d369f71da204b752cd16a637d7b7ecc.
@jay18001 Please can you tag your commit and create stable version since to use it as dependency in published package it needs to be have stable version. Check this comment: https://forums.swift.org/t/dependencies-could-not-be-resolved-because-package-yeelampa-is-required-using-a-stable-version-but-yeelampa-depends-on-an-unstable-version-package-requester-and-root-depends-on-yeelampa-0-1-0/53840/2
@jay18001 Please can you tag your commit and create stable version since to use it as dependency in published package it needs to be have stable version. Check this comment: https://forums.swift.org/t/dependencies-could-not-be-resolved-because-package-yeelampa-is-required-using-a-stable-version-but-yeelampa-depends-on-an-unstable-version-package-requester-and-root-depends-on-yeelampa-0-1-0/53840/2
Created tag in my fork for this use: https://github.com/pragnesh-is/TrueTime.swift/tree/5.2.0