diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..58f1ada --- /dev/null +++ b/Package.swift @@ -0,0 +1,24 @@ +// swift-tools-version: 5.4 + +import PackageDescription + + let package = Package( + name: "opentracing", + platforms: [ + .iOS(.v8), + .macOS(.v10_15) + ], + products: [ + .library( + name: "opentracing", + targets: ["opentracing"] + ) + ], + targets: [ + .target( + name: "opentracing", + path: "Pod/Classes", + publicHeadersPath: "" + ) + ] + ) diff --git a/README.md b/README.md index f74916c..645946a 100644 --- a/README.md +++ b/README.md @@ -17,3 +17,18 @@ Use [CocoaPods](https://guides.cocoapods.org/using/getting-started.html)! ```ruby pod "opentracing" ``` + +## Installation (Swift Package Manager) + + The [Swift Package Manager](https://www.swift.org/package-manager/) is a tool for managing the distribution of Swift code. + + Add the following to your `Package.swift` file: + ``` + dependencies: [ + .package(url: "https://github.com/opentracing/opentracing-objc.git", .branch("master")) + ] + ``` + And then build your project + ``` + $ swift build + ```