FeddyDocs
Quickstarts

SwiftUI

Add Feddy to a SwiftUI app with Swift Package Manager and send your first message.

By the end of this page your app has a support entry point, and a message sent from it shows up in your Feddy inbox.

Prerequisites

  • A Feddy project and its project ID from Settings → Install. Create a project if you have none.
  • Xcode 15 or later. The SDK targets iOS 15 and has no third-party dependencies.

Install

In Xcode choose File → Add Package Dependencies… and paste:

https://github.com/FeddyLab/feddy-ios

Or add it to Package.swift:

.package(url: "https://github.com/FeddyLab/feddy-ios", from: "0.7.0")

Initialize

Call configure once, before any other Feddy call. Later calls are ignored.

App.swift
import Feddy

@main
struct MyApp: App {
    init() {
        Feddy.configure(projectId: "fd_XXXXXXXXXXXXXXXX")
    }
    var body: some Scene { WindowGroup { ContentView() } }
}

The project ID ships inside your binary and is public by design. Commit it. Do not put it in a secrets file or an environment variable.

Add an entry point

Put a row where users already look for help, usually in Settings:

Form {
    Button("Support") { Feddy.present() }
        .feddyUnreadBadge()
}

present() opens the conversation list as a sheet over whatever is on screen. presentNewConversation() skips the list and opens the compose form.

Verify

Run the app, open the row, and send a message. It appears in your Feddy inbox. Reply from the inbox; the reply shows up in the sheet and the row’s badge shows 1 until the user reads it.

Next steps