HelpKit

main

Add a help screen to your app in just a few lines of code.
adamfootdev/HelpKit

HelpKit

Platform

HelpKit provides developers for Apple platforms with the ability to add a Help screen to their apps. This built using SwiftUI so can be displayed natively from a SwiftUI app or using a UIHostingController in a UIKit app.

This has been localised into multiple languages and the buttons will automatically adapt to your appʼs accent color.

  1. Requirements
  2. Integration
  3. Usage
  4. Other Packages

Requirements

  • iOS/iPadOS 15.0+
  • macOS 13.0+
  • tvOS 16.0+
  • visionOS 1.0+
  • watchOS 8.0+
  • Xcode 15.0+

Integration

Swift Package Manager

HelpKit can be added to your app via Swift Package Manager in Xcode. Add to your project like so:

dependencies: [
    .package(url: "https://github.com/adamfootdev/HelpKit.git", from: "1.0.0")
]

Usage

To start using the framework, you'll need to import it first:

import HelpKit

HKConfiguration

This is a struct containing all of the relevant details required to configure HelpKit. It can be created like so:

let configuration = HKConfiguration(
    displayMode: .navigation,
    topicSections: topicSections
) {
    print("Get Support")
}

HKTopicSection

This is a struct containing details about a help topic section. It can be created like so:

let topicSection = HKTopicSection(
    "Topic Section",
    topics: topics
)

HKTopic

This is a struct containing details about a help topic. It can be created like so:

let topic = HKTopic(
    "Topic",
    iconSystemImage: "questionmark.circle",
    iconTint: .red,
    content: "Some content here…",
    contentImage: Image("image"),
    links: links,
    keywords: ["keyword"]
)

HKLink

This is a struct containing details about a help link. It can be created like so:

let topic = HKLink(
    "Website",
    url: URL(string: "https://www.example.com")!
)

HelpView

Create an instance of the view using the following:

HelpView(configuration: configuration)

Other Packages

Add an about screen to your app.

Add a features list screen to your app.

Description

  • Swift Tools 5.9.0
View More Packages from this Author

Dependencies

  • None
Last updated: Sun Sep 08 2024 03:45:13 GMT-0900 (Hawaii-Aleutian Daylight Time)