From b4ca503d93184d634a99c72f2cc08bf0f80ccbd5 Mon Sep 17 00:00:00 2001 From: Patrick W Date: Mon, 10 Feb 2025 10:43:58 +0100 Subject: [PATCH] Update README.md Improved spm instructions. --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 42cdaa8..874218d 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,16 @@ To install Turf using the [Swift Package Manager](https://swift.org/package-mana ```swift .package(url: "https://github.com/mapbox/turf-swift.git", from: "4.0.0") ``` +Next, add the product to the target's dependencies. For example, for an executable linux app you need to add: +```swift +.executableTarget(name: "App", + dependencies: [ + .product(name: "Turf", package: "turf-swift") // Add this + ], + path: "Sources/App" +) +``` Then `import Turf` in any Swift file in your module.