iOS (SwiftUI)
Add a native feature request board to your iPhone app. It takes three steps.
Needs iOS 17 or later and Swift 5.9 or later. No other packages needed.
Install
Add the package in Xcode
In Xcode, open File → Add Package Dependencies… and paste this URL:
https://github.com/fewchurs/fewchurs-swiftOr add it to Package.swift
If your project uses a Package.swift file, add this line instead:
Package.swiftdependencies: [ .package(url: "https://github.com/fewchurs/fewchurs-swift", from: "1.0.0") ]
Set up
Call configure once, when your app starts. Use the API key from your dashboard.
import SwiftUI
import FeatureRequestKit
@main
struct MyApp: App {
init() {
FeatureRequestKit.configure(apiKey: "fr_live_xxx")
}
var body: some Scene {
WindowGroup {
ContentView()
}
}
}Show the board
FeatureRequestBoardView is a normal SwiftUI view. Show it in a sheet, a tab, or push it onto a navigation stack. It handles everything inside: the list, votes, comments and new requests.
import SwiftUI
import FeatureRequestKit
struct SettingsView: View {
@State private var showBoard = false
var body: some View {
Button("Suggest a feature") {
showBoard = true
}
.sheet(isPresented: $showBoard) {
FeatureRequestBoardView()
}
}
}Using UIKit
Wrap the board in a UIHostingController and present it from any view controller.
import UIKit
import SwiftUI
import FeatureRequestKit
let board = UIHostingController(rootView: FeatureRequestBoardView())
present(board, animated: true)Colors and theme
By default the board follows your app: system colors, your accent color, and light or dark mode. To change it, pass a theme to configure.
// A built-in dark theme
FeatureRequestKit.configure(apiKey: "fr_live_xxx", theme: .midnight)
// Or your own colors
let theme = FeatureRequestTheme(
background: Color(.systemBackground),
accent: .orange,
cornerRadius: 16
)
FeatureRequestKit.configure(apiKey: "fr_live_xxx", theme: theme)| Theme | What it looks like |
|---|---|
.system | Default. Follows the phone's light or dark mode. |
.midnight | Always dark, black and white. |
FeatureRequestTheme(…) | Your own background, accent color and corner radius. |
About the API key
It's fine to put this key in your app. It can only do what the board does: list, vote, comment and suggest. It can't change your settings or read anything private.
What your plan changes
Your plan is applied on our servers, so you never need to change code or update the SDK when it changes.
| Free | Starter | Pro | |
|---|---|---|---|
| Requests the board lists | First 5 | First 200 | All |
| "Powered by Fewchurs" line | Shown | Hidden | Hidden |
Newer requests are still saved and show in your dashboard. A request someone just submitted appears on their board straight away, but once the app is past its limit it leaves the list on the next refresh. See pricing.