Skip to content

Latest commit

 

History

History
51 lines (44 loc) · 2.41 KB

README.md

File metadata and controls

51 lines (44 loc) · 2.41 KB

OnboardingKit

No this project is not dead (unless its very clearly dead!) OnboardingKit won't really change much 'cus it's... onboardings...Maybe custom screens in the future?

I'm back

OnboardingKit is a framework that allows you to display a simple an consistent onboarding experience that only takes a few lines of code. It works on iOS, macOS, tvOS, visionOS, and watchOS.

Important

Since OnboardingKit reads from Info.plist, add the key CFBundleDisplayName as your app's name.

To get started, just wrap your code in a GuidedView. You must at least specify a privacy message and URL. Onboarding expericences are written as the code below

Tip

For accessibility reasons, only include up to three features. GuidedView supports scrolling, but that is only for smaller screens and apps that absolutely NEED to display extra features.

struct MyGuidedApp: App {
    var body: some Scene {
        WindowGroup {
            GuidedView(
                features: [
                    OnboardingFeature(
                        "Preview your apps",
                        systemImage: "iphone.gen3.motion",
                        description: "You can easily preview your apps on a variety of devices."
                    ),
                    OnboardingFeature(
                        "Verify different situations",
                        systemImage: "questionmark.app.dashed",
                        description: "Previews how your app looks when things are different."
                    )
                ],
                privacyDescription: "\(Bundle.main.infoDictionary?["CFBundleDisplayName"] as? String ?? "BUNDLE_NAME") does not use your data in any way throughout usage.",
                privacyURL: URL(string: "https://www.apple.com/privacy")!
            ) {
                Text("Hello, World!")
            }
        }
    }
}