From 794a8a691b61a4392163a607300dffa96c9ac00b Mon Sep 17 00:00:00 2001 From: Chris Howell Date: Sun, 30 Aug 2026 22:07:35 +0100 Subject: [PATCH] docs: modernize Swift Package Manager installation instructions Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01FroLiTxrdpG22rB3BkMDqq --- README.md | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 14162fd..310f716 100644 --- a/README.md +++ b/README.md @@ -61,22 +61,16 @@ let isNighttime = solar.isNighttime ## Installation -Solar is available through Swift Package Manager. - -### Swift Package Manager - -To include Solar in an application in Xcode: - -1. Go to File ‣ Swift Packages ‣ Add Package Dependency. -1. Enter `https://github.com/ceeK/Solar.git` as the package repository and click Next. -1. Set Rules to Version, Up to Next Major, and enter `4.0.0` as the minimum version requirement. Click Next. - -To include Solar in another Swift package, add the following [dependency](https://developer.apple.com/documentation/swift_packages/package/dependency) to your Package.swift: +Solar is available through the Swift Package Manager. Add it to the `dependencies` value of your `Package.swift`: ```swift -.package(name: "Solar", url: "https://github.com/ceeK/Solar.git", from: "4.0.0") +dependencies: [ + .package(url: "https://github.com/ceeK/Solar.git", .upToNextMajor(from: "4.0.0")) +] ``` +Or in Xcode: **File ▸ Add Package Dependencies…** and enter `https://github.com/ceeK/Solar.git` as the package URL. + # License Solar is available under the MIT license. See the [LICENSE](LICENSE) file for details.