TrueTime.swift icon indicating copy to clipboard operation
TrueTime.swift copied to clipboard

SwiftPM manifest file

Open enricode opened this issue 6 years ago • 8 comments

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?

enricode avatar Oct 03 '19 12:10 enricode

+1 I'd like to use TrueTime.swift in a package I'm working on, and I need SPM support as well.

davedelong avatar Feb 04 '20 20:02 davedelong

bump +1

otymartin avatar Sep 29 '20 01:09 otymartin

I have package manager support on my fork https://github.com/jay18001/TrueTime.swift/

jay18001 avatar Oct 03 '20 19:10 jay18001

Is there any reason why there is no Swift PM support yet?

MartPiet avatar Dec 11 '20 16:12 MartPiet

@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"

nobinajohan avatar Apr 26 '21 19:04 nobinajohan

Hi @nobinajohan,

You have to use the commit hash -> 80f4900a6d369f71da204b752cd16a637d7b7ecc.

dregatos avatar May 14 '21 12:05 dregatos

@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

pragnesh-is avatar Nov 14 '22 21:11 pragnesh-is

@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

pragnesh-is avatar Nov 14 '22 21:11 pragnesh-is