Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adamfootdev/helpkit
Add a help screen to your app in just a few lines of code.
https://github.com/adamfootdev/helpkit
ios swiftui xcode
Last synced: 1 day ago
JSON representation
Add a help screen to your app in just a few lines of code.
- Host: GitHub
- URL: https://github.com/adamfootdev/helpkit
- Owner: adamfootdev
- License: mit
- Created: 2023-09-28T16:13:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-04T11:44:26.000Z (3 months ago)
- Last Synced: 2024-12-30T22:20:52.061Z (10 days ago)
- Topics: ios, swiftui, xcode
- Language: Swift
- Homepage:
- Size: 72.3 KB
- Stars: 14
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# HelpKit
![Platform](https://img.shields.io/badge/platforms-iOS%2FiPadOS%2015.0%2B%20%7C%20macOS%2013.0%2B%20%7C%20tvOS%2015.0%2B%20%7C%20visionOS%201.0%2B%20%7C%20watchOS%208.0%2B-blue)
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](#requirements)
2. [Integration](#integration)
3. [Usage](#usage)
- [HKConfiguration](#hkconfiguration)
- [HKTopicSection](#hktopicsection)
- [HKTopic](#hktopic)
- [HKLink](#hklink)
- [HelpView](#helpview)
4. [Other Packages](#other-packages)
- [AboutKit](https://github.com/adamfootdev/AboutKit)
- [FeaturesKit](https://github.com/adamfootdev/FeaturesKit)## 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:
```swift
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:
```swift
import HelpKit
```### HKConfiguration
This is a struct containing all of the relevant details required to configure HelpKit. It can be created like so:
```swift
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:
```swift
let topicSection = HKTopicSection(
"Topic Section",
topics: topics
)
```### HKTopic
This is a struct containing details about a help topic. It can be created like so:
```swift
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:
```swift
let topic = HKLink(
"Website",
url: URL(string: "https://www.example.com")!
)
```### HelpView
Create an instance of the view using the following:
```swift
HelpView(configuration: configuration)
```## Other Packages
### [AboutKit](https://github.com/adamfootdev/AboutKit)
Add an about screen to your app.
### [FeaturesKit](https://github.com/adamfootdev/FeaturesKit)
Add a features list screen to your app.