Swift Package Manager
If you want more information about installing Swift packages through Xcode, follow these instructions. If you want to learn more about Swift Package Manager, this page goes into detail.
If you’re a framework author and want to use SwiftCurrent as a dependency, these changes will be in your Package.swift
file.
Get the Package
Add the following line to the package dependencies:
.package(url: "https://github.com/wwt/SwiftCurrent.git", .upToNextMajor(from: "5.1.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.
CocoaPods
Set up CocoaPods for your project, then include SwiftCurrent in your dependencies by adding the following line to your Podfile
:
To Use SwiftCurrent With UIKit
pod 'SwiftCurrent/UIKit'
To Use SwiftCurrent With SwiftUI
pod 'SwiftCurrent/SwiftUI'
Your Import Statement
import SwiftCurrent