iOS (Swift)
The FeedbackJar iOS SDK lets you submit feedback and list public posts from native iOS apps. You build your own form — the SDK handles submission with device metadata attached.
- Package: Swift Package Manager
- Min iOS: 15.0
- Repository: github.com/feedbackjar/swift-sdk
Installation
In Xcode: File → Add Package Dependencies, enter the repository URL, and add FeedbackJar to your target.
Or in Package.swift:
dependencies: [
.package(url: "https://github.com/feedbackjar/swift-sdk", from: "1.0.0"),
],
targets: [
.target(name: "MyApp", dependencies: ["FeedbackJar"]),
] Setup
Configure once before use — typically in your SwiftUI App.init:
import FeedbackJar
@main
struct MyApp: App {
init() {
FeedbackJar.configure(widgetId: "your-widget-id")
}
} Get your widget ID from Settings → Widgets in your FeedbackJar workspace.
Submit feedback
Submissions are anonymous. Each submission automatically includes device metadata (iOS version, device model, screen size, app version, locale).
let result = await FeedbackJar.shared.submit(userText)
switch result {
case .success(let response):
print("Submitted: \(response.postId)")
case .failure(let error):
print("Failed: \(error)")
} A callback variant is available when you are not in an async context:
FeedbackJar.shared.submit(userText) { result in
switch result {
case .success(let response): // show success state
case .failure(let error): // show error state
}
} List feedback
Fetch the public feedback feed with optional pagination:
let result = await FeedbackJar.shared.listFeedback(limit: 20)
if case .success(let page) = result {
for post in page.posts {
print("\(post.title) — \(post.upvotes) upvotes")
}
} Pass boardId to filter by board, or cursor for pagination.
API reference
| Method | Description |
|---|---|
configure(widgetId:) | Configure the SDK. Call once before anything else. |
submit(_ content:) async | Submit anonymous feedback. Returns Result<FeedbackResponse, Error>. |
listFeedback(boardId:limit:cursor:) async | List public feedback. limit is clamped to 1–50. |
Notes
- Only anonymous submission is supported — no user identity is sent.
- The server rate-limits submissions (5 per 15 minutes per IP).
- Private boards and non-public posts are never returned by
listFeedback.