FeedbackJar

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.

Installation

In Xcode: File → Add Package Dependencies, enter the repository URL, and add FeedbackJar to your target.

Or in Package.swift:

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:

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

swift
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:

swift
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:

swift
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

MethodDescription
configure(widgetId:)Configure the SDK. Call once before anything else.
submit(_ content:) asyncSubmit anonymous feedback. Returns Result<FeedbackResponse, Error>.
listFeedback(boardId:limit:cursor:) asyncList 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.