Installation

Shayan TaslimUpdated

Install the Swift SDK with Swift Package Manager, then initialize it with your UserJot project ID during app startup.

Requirements

Before installing, make sure your app meets these minimum requirements:

  • iOS 15.0+ or macOS 12.0+

  • Swift 6.1+

  • Xcode 16.3+

Install with Swift Package Manager

In Xcode

  1. Open your project in Xcode.

  2. Go to File → Add Package Dependencies.

  3. Enter this package URL:

text
https://github.com/UserJot/userjot-ios
  1. Add the package to your app target.

In Package.swift

If you manage dependencies in Package.swift, add UserJot to your package dependencies:

Swift
dependencies: [
    .package(url: "https://github.com/UserJot/userjot-ios", from: "0.4.0")
]

Verify the package is available

After installation, confirm the SDK imports correctly:

Swift
import UserJot

If the project builds, the package is installed correctly.

Find your project ID

You need your UserJot project ID before calling setup(...).

In your UserJot dashboard, open Settings → Login and copy Project ID from the Secrets section. Keep it available to your app startup code.

Initialize the SDK

Call UserJot.setup(projectId:) once when the app starts:

Swift
import UserJot

UserJot.setup(projectId: "YOUR_PROJECT_ID")

SwiftUI example

Swift
import SwiftUI
import UserJot

@main
struct MyApp: App {
    init() {
        UserJot.setup(projectId: "YOUR_PROJECT_ID")
    }

    var body: some Scene {
        WindowGroup {
            ContentView()
        }
    }
}

UIKit example

Swift
import UIKit
import UserJot

@main
class AppDelegate: UIResponder, UIApplicationDelegate {
    func application(
        _ application: UIApplication,
        didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
    ) -> Bool {
        UserJot.setup(projectId: "YOUR_PROJECT_ID")
        return true
    }
}

Verify the integration

setup returns immediately and loads your board's address in the background. A show call made before that finishes waits for it, then presents. If the address could not be loaded, for example because the device was offline at launch, the next call tries again.

Present feedback from a button to check the setup:

Swift
Button("Send Feedback") {
    UserJot.showFeedback()
}

If the view opens, the SDK is installed and initialized. The URL methods, such as UserJot.feedbackURL(), are async for the same reason: they wait for the address, and return nil if it could not be loaded.

macOS note

For sandboxed macOS apps, enable outbound network access in your entitlements:

xml
<key>com.apple.security.network.client</key>
<true/>

Without that entitlement, the SDK will not be able to load remote content.

Migrating from 0.3

  • showChangelog() is now showUpdates(), and changelogURL() is now updatesURL(). The old names still work with a deprecation warning and an Xcode fix-it, and will be removed in 1.0.

  • feedbackURL(board:), roadmapURL(), and updatesURL() are async. Add await at each call site.

  • UserJot runs on the main actor. Calls from UI code need no change; call it from a background task with await.

  • The minimum platforms are now iOS 15 and macOS 12.

Did this answer your question?