diff --git a/README.md b/README.md index 533fa55..c2ec6d3 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![Carthage CI status](https://github.com/mattrubin/OneTimePassword/actions/workflows/carthage.yml/badge.svg)](https://github.com/mattrubin/OneTimePassword/actions/workflows/carthage.yml) [![Code Coverage](https://img.shields.io/codecov/c/github/mattrubin/OneTimePassword/develop.svg)](https://codecov.io/gh/mattrubin/OneTimePassword) [![Swift 5.x](https://img.shields.io/badge/swift-5.x-orange.svg)](#usage) -![Platforms: iOS, watchOS](https://img.shields.io/badge/platforms-iOS%20%7C%20watchOS-blue.svg) +![Platforms: iOS, macOS, watchOS](https://img.shields.io/badge/platforms-iOS%20%7C%20macOS%20%7C%20watchOS-blue.svg) [![MIT License](https://img.shields.io/badge/license-MIT-lightgray.svg)](LICENSE.md) The OneTimePassword library is the core of [Authenticator][]. It can generate both [time-based][RFC 6238] and [counter-based][RFC 4226] one-time passwords as standardized in [RFC 4226][] and [RFC 6238][]. It can also read and generate the ["otpauth://" URLs][otpauth] commonly used to set up OTP tokens, and can save and load tokens to and from the iOS secure keychain. @@ -35,6 +35,19 @@ Be sure to check the Carthage README file for the latest instructions on [adding [Cartfile]: https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfile [carthage-instructions]: https://github.com/Carthage/Carthage/blob/master/README.md#adding-frameworks-to-an-application +### [SPM][] + +Add the following line to the `dependencies` section of your [package manifest][Package.swift]: + +```swift +.package(url: "https://github.com/mattrubin/OneTimePassword.git", from: "4.0.0"), +``` + +Then add `"OneTimePassword"` to the dependencies array of any target which should be linked with this library. + +[SPM]: https://swift.org/package-manager/ +[Package.swift]: https://github.com/apple/swift-package-manager/tree/master/Documentation + ## Usage > The [latest version][swift-5] of OneTimePassword compiles with Swift 5. To use OneTimePassword with earlier versions of Swift, check out the [`swift-4.2`][swift-4.2], [`swift-4`][swift-4], [`swift-3`][swift-3], and [`swift-2.3`][swift-2.3] branches. To use OneTimePassword in an Objective-C based project, check out the [`objc` branch][objc] and the [1.x releases][releases].