Skip to main content

Before you install

You need iOS 14 or later, Swift 5.9 or later, and Swift Package Manager. In Glean Feed, open Settings → Connections → iOS SDK as an Owner or Admin and copy the workspace ID and workspace slug. Both are safe to ship in your app; neither is a secret.

Add the package

In Xcode: File → Add Package Dependencies…, then paste:
Choose Exact Version and enter 0.1.2. The corresponding Git tag is v0.1.2. If you manage dependencies in Package.swift, add:

Initialize once

Call setup once, early — in your SwiftUI App initializer or application(_:didFinishLaunchingWithOptions:):
For a local dev stack, pass environment: .custom(baseURL: URL(string: "http://localhost:3000")!). It defaults to .production.

Present a view

SwiftUI

UIKit

Run the app and open feedback. You should see the expected workspace’s portal in a native sheet with a Done button. This first check works anonymously; identity is the next step.

Next steps