A SwiftUI view that renders your feedback board natively on iOS, macOS, visionOS, watchOS and tvOS. Open source at github.com/wishkit/wishkit-ios.
Requirements: Xcode, and a target on iOS 16+, macOS 13+, visionOS 1+, watchOS 10+ or tvOS 17+. Version 5 and later is SwiftUI-only.
In Xcode choose File, Add Package Dependencies, paste the URL, and add the WishKit product to the app target that shows the board.
1 https://github.com/wishkit/wishkit-ios.git
Call configure once, as early as possible. The App initializer is the usual place. Get the key from your project in the dashboard.
1 import WishKit
2
3 WishKit.configure(with: "your-api-key")
The board is a view. On iOS and tvOS it expects a navigation container; if you are not already inside a NavigationStack, add the modifier that provides one. macOS, visionOS and watchOS bring their own navigation, so use the plain view there.
1 // iOS and tvOS
2 WishKit.FeedbackListView().withNavigation()
3
4 // macOS, visionOS, watchOS
5 WishKit.FeedbackListView()
From UIKit, wrap it in a hosting controller and push or present it like any other screen:
1 let feedback = UIHostingController(rootView: WishKit.FeedbackListView().withNavigation())
2 present(feedback, animated: true)
Put the entry point where users look for it, and label it "Feedback" or "Feature Requests". In order of how well they work: a tab with a lightbulb symbol, a row on the settings screen, a toolbar or menu item.
1 WishKit.FeedbackListView().withNavigation()
2 .tabItem { Label("Feedback", systemImage: "lightbulb") }
Users vote anonymously by default and their votes stay consistent across launches. If your app knows more, pass it along whenever it changes, for example after sign-in or a purchase. Only pass what you already have.
1 WishKit.updateUser(email: "jane@example.com")
2 WishKit.updateUser(name: "Jane")
3 WishKit.updateUser(customID: "user_8AHD1IL03ACIP")
4 WishKit.updateUser(payment: .monthly(7.99))
The payment value accepts weekly, monthly, or yearly amounts. With it set, the dashboard can sort requests by the revenue of the users who asked.
Set these next to the configure call. Everything is optional; the defaults look native.
| Property | What it does |
|---|---|
WishKit.theme.primaryColor | Accent color for the vote button and primary actions. Use your app's accent color. |
WishKit.theme.secondaryColor, tertiaryColor | Background colors, with light and dark variants. Leave them to the defaults for a native look. |
WishKit.config.allowUndoVote | Lets a user take a vote back. |
WishKit.config.statusBadge | .show or .hide the status badge on each request. |
WishKit.config.commentSection | .show or .hide comments in the detail view. |
WishKit.config.expandDescriptionInList | Shows full descriptions in the list instead of truncating them. |
WishKit.config.buttons.voteButton.icon | Changes the voting icon. |
WishKit.config.buttons.segmentedControl | Configures the open and completed segments. |
WishKit.config.translateButton | On iOS 18 and later, an on-device translate button for requests written in other languages. |
WishKit.config.localization | Override any string the SDK shows. |
1 WishKit.theme.primaryColor = .accentColor
2 WishKit.config.statusBadge = .show
3 WishKit.config.commentSection = .show
Check that configure ran before the view appeared, that the key matches the project in the dashboard, and, on macOS, that the sandbox allows outgoing connections.
You are looking at a different project. Each project has its own key and its own board.
Add .withNavigation(), or place the view inside your own NavigationStack.