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

Build error unknown package 'Web3' in dependencies of target 'MyProject' #100

Open
mudilajaganios opened this issue Mar 22, 2021 · 1 comment

Comments

@mudilajaganios
Copy link

I am getting the subject build error after adding the following dependencies to my target.

dependencies: [ .product(name: "Web3", package: "Web3") // .product(name: "Web3PromiseKit", package: "Web3"), // .product(name: "Web3ContractABI", package: "Web3"), ]),

This is my package.swift file

// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "myapp-sdk-swift",
platforms: [
.iOS(.v10),
.macOS(.v10_12)
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "myapp-sdk-swift",
targets: ["myapp-sdk-swift"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(url: "https://github.com/Boilertalk/Web3.swift.git", from: "0.5.0")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "myapp-sdk-swift",
dependencies: [
.product(name: "Web3", package: "Web3")
// .product(name: "Web3PromiseKit", package: "Web3"),
// .product(name: "Web3ContractABI", package: "Web3"),
]),
.testTarget(
name: "myapp-sdk-swiftTests",
dependencies: ["myapp-sdk-swift"]),
],
swiftLanguageVersions: [.v5]
)

@matthewlui
Copy link

This reason is relatively stupid, try not to follow the setup code in readme,
instead of putting:
.product(name: "Web3", package: "Web3")
use
.product(name: "Web3", package: "Web3.swift")

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