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

TweetNacl can't be incuded in SPM package descriptions #7

Open
HelgeBecker opened this issue Apr 23, 2021 · 1 comment
Open

TweetNacl can't be incuded in SPM package descriptions #7

HelgeBecker opened this issue Apr 23, 2021 · 1 comment

Comments

@HelgeBecker
Copy link

Given a Package.swift description like this:

// swift-tools-version:5.3 import PackageDescription let package = Package(name: "Foo", platforms: [ .macOS(.v10_12) ], products: [ .library( name: "Foo", targets: ["Foo"]), ], dependencies: [ .package(url: "https://github.com/bitmark-inc/tweetnacl-swiftwrap.git", from: "1.0.2"), ], targets: [ .target(name: "Foo", dependencies: ["tweetnacl-swiftwrap"]), ], swiftLanguageVersions: [.v5])

Will lead to an error during resolving:
product 'tweetnacl-swiftwrap' not found. it is required by package 'Foo' target 'Foo'.

Happens with Xcode 12.4 (current) and 12.5 (12E262)

@danielrbrowne
Copy link
Contributor

danielrbrowne commented May 6, 2021

I've found that this works for me in Xcode 12.4 / 12.5:

// swift-tools-version:5.3
import PackageDescription

let package = Package(
    name: "Foo",
    platforms: [.iOS("13.0"),
                .macOS("10.15")],
    products: [
        .library(
            name: "Foo",
            targets: ["Foo"])
    ],
    dependencies: [
        .package(name: "TweetNacl",
                 url: "https://github.com/bitmark-inc/tweetnacl-swiftwrap",
                 .upToNextMajor(from: "1.0.0"))
    ],
    targets: [
        .target(
            name: "Foo",
            dependencies: [
                "TweetNacl"
            ]),
    ]
)

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

2 participants