OnboardingKit
is a SwiftUI library for handling onboarding.
- iOS: 17.0 or later.
- macOS: 14.0 or later.
You can install OnboardingKit
using the Swift Package Manager.
- In Xcode, select "File" > "Add Package Dependencies".
- Copy & paste the following into the "Search or Enter Package URL" search bar.
https://github.com/JamesSedlacek/OnboardingKit.git
- Xcode will fetch the repository & the "OnboardingKit" library will be added to your project.
- Create an
Onboarding Configuration
.
import OnboardingKit
import SwiftUI
extension OnboardingConfiguration {
static let prod = Self.init(privacyUrlString: "",
accentColor: .green,
features: [])
}
- Add
.showOnboardingIfNeeded()
to the root view in your project.
import OnboardingKit
import SwiftUI
@main
struct ExampleApp: App {
var body: some Scene {
ContentView()
.showOnboardingIfNeeded(using: .prod)
}
}