Add the following line to the dependencies
in your Package.swift
file:
.package(name: "NMapsMap", url: "https://github.com/stleamist/NMapsMap-SwiftPM.git", .upToNextMajor(from: "3.10.0"))
Next, add NMapsMap
as a dependency for your targets:
.target(name: "MyTarget", dependencies: ["NMapsMap"])
Your completed description may look like this:
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "MyPackage",
dependencies: [
.package(name: "NMapsMap", url: "https://github.com/stleamist/NMapsMap-SwiftPM.git", .upToNextMajor(from: "3.10.0"))
],
targets: [
.target(name: "MyTarget", dependencies: ["NMapsMap"])
]
)
Select File > Swift Packages > Add Package Dependency, then enter the following URL:
https://github.com/stleamist/NMapsMap-SwiftPM.git
For more details, see Adding Package Dependencies to Your App.