Swift Package Manager
If you’re a framework author and want to use SwiftCurrent as a dependency, these changes will be in your
Get the Package
Add the following line to the package dependencies:
.package(url: "https://github.com/wwt/SwiftCurrent.git", .upToNextMajor(from: "4.5.0")),
Get the Products
Add the following products to your target dependencies:
.product(name: "SwiftCurrent", package: "SwiftCurrent"), .product(name: "SwiftCurrent_UIKit", package: "SwiftCurrent") .product(name: "SwiftCurrent_SwiftUI", package: "SwiftCurrent")
Your Import Statements for These Products
import SwiftCurrent import SwiftCurrent_UIKit import SwiftCurrent_SwiftUI
SwiftCurrent_UIKit will need to target a platform that supports UIKit, such as iOS, tvOS, or macOS with Catalyst.
SwiftCurrent_SwiftUI requires the minimum versions of iOS 14.0, macOS 11, tvOS 14.0, or watchOS 7.0.
Set up CocoaPods for your project, then include SwiftCurrent in your dependencies by adding the following line to your
To Use SwiftCurrent With UIKit
To Use SwiftCurrent With SwiftUI
Your Import Statement