Fewchurs
Docs / iOS (SwiftUI)

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

  1. Add the package in Xcode

    In Xcode, open File → Add Package Dependencies… and paste this URL:

    https://github.com/fewchurs/fewchurs-swift
  2. Or add it to Package.swift

    If your project uses a Package.swift file, add this line instead:

    Package.swift
    dependencies: [
        .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.

MyApp.swift
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.

SettingsView.swift
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)
ThemeWhat it looks like
.systemDefault. Follows the phone's light or dark mode.
.midnightAlways 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.

The SDK gives each device a random ID and keeps it in the Keychain. That is how it remembers votes without an account. Read more in How it works.

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.

FreeStarterPro
Requests the board listsFirst 5First 200All
"Powered by Fewchurs" lineShownHiddenHidden

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.