Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwiftPM manifest file #82

Open
enricode opened this issue Oct 3, 2019 · 8 comments
Open

SwiftPM manifest file #82

enricode opened this issue Oct 3, 2019 · 8 comments

Comments

@enricode
Copy link

enricode commented Oct 3, 2019

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?

@davedelong
Copy link

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

@otymartin
Copy link

bump +1

@jay18001
Copy link

jay18001 commented Oct 3, 2020

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

@MartPiet
Copy link

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

@nobinajohan
Copy link

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

@dregatos
Copy link

dregatos commented May 14, 2021

Hi @nobinajohan,

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

@pragnesh-is
Copy link

pragnesh-is commented Nov 14, 2022

@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
Copy link

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants