I’m working on creating a shared library for my apps and I’m hitting a roadblock.
I have an extension that we use for loading web images and we use SDwebImage for this task and when i try to build our swift package I get this error:
No such module ‘SDWebImage’
I believe I have everything setup right, so I’m. a bit lost on what I’m not doing correctly, here is what my Package.swift looks like:
// swift-tools-version: 5.10
import PackageDescription
let package = Package(
name: "EDShared",
platforms: [
.iOS(.v13)
],
products: [
// Products define the executables and libraries a package produces, making them visible to other packages.
.library(name: "EDShared", targets: ["EDShared"]),
],
dependencies: [
.package(url: "https://github.com/auth0/JWTDecode.swift.git", .upToNextMajor(from: "3.1.0")),
.package(url: "https://github.com/SDWebImage/SDWebImage.git", .upToNextMajor(from: "5.19.2"))
],
targets: [
// Targets are the basic building blocks of a package, defining a module or a test suite.
// Targets can depend on other targets in this package and products from dependencies.
.target(
name: "EDShared",
dependencies: [
.product(name: "JWTDecode", package: "JWTDecode.swift"),
.product(name: "SDWebImage", package: "SDWebImage")
]
),
]
)