You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've made a swift package that has a dependency on SwiftyJSON.
I've included it as a SPM package as per the documentation on github.
dependencies: [
.package(url: "https://github.com/jernejstrasner/CCommonCrypto.git", .branch("master")),
.package(url: "https://github.com/SwiftyJSON/SwiftyJSON.git", from: "4.0.0")
}
What did you expect to happen?
SwifyJSON should be importable as a module in my package
What actually happened instead?
Hower, I keep getting: "No such module 'SwiftyJSON'".
Other packages work fine
Environment
List the software versions you're using:
SwiftyJSON: 4.3.0
Xcode Version: 12.0
Swift Version: 5.3
Please also mention which package manager you used and its version. Delete the
other package managers in this list:
Swift Package Manager - Swift 5.3.0)
The text was updated successfully, but these errors were encountered:
Hi, I had the same problem with another sub-dependency. You need to add the name of the sub-module (not the url) also in targets.
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 which this package depends on.
.target(
name: "PackageName",
dependencies: ["NameOfSubDependency"]),
...
]
Afterwards, I was able to import the sub-module into the module. You might have to clean and build again. What also helped was to remove the module in the target under General / "Frameworks,libraries And Embeddedcontent" and then add it again after typing the dependency in the package file.
What did you do?
I've made a swift package that has a dependency on SwiftyJSON.
I've included it as a SPM package as per the documentation on github.
dependencies: [
.package(url: "https://github.com/jernejstrasner/CCommonCrypto.git", .branch("master")),
.package(url: "https://github.com/SwiftyJSON/SwiftyJSON.git", from: "4.0.0")
}
What did you expect to happen?
SwifyJSON should be importable as a module in my package
What actually happened instead?
Hower, I keep getting: "No such module 'SwiftyJSON'".
Other packages work fine
Environment
List the software versions you're using:
Please also mention which package manager you used and its version. Delete the
other package managers in this list:
The text was updated successfully, but these errors were encountered: