Skip to main content

iOS Configuration

The recommended pattern is a single startup configuration call.

SwiftUI + AppDelegateAdaptor

import SwiftUI
import UIKit
import FidbekSDK

@main
struct SampleApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) private var appDelegate

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

final class AppDelegate: NSObject, UIApplicationDelegate {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
Fidbek.shared.configure(
token: "YOUR_TOKEN"
)
Fidbek.shared.identify(
userId: "user_123",
email: "talha@example.com"
)
return true
}
}

This is a common production setup and works well with standard iOS lifecycle behavior.

Optional parameter

Fidbek.shared.configure(
token: "YOUR_TOKEN",
shakeToOpenEnabled: true
)

Optional identity

Use identify only when you want to associate SDK activity with an app user. At least one field is required.

Fidbek.shared.identify(
userId: "user_123",
name: "Talha",
email: "talha@example.com"
)

Call Fidbek.shared.clearIdentity() on logout or account switch.

Endpoint behavior

The report endpoint is fixed internally in the current SDK line:

https://api.fidbek.dev/v1/sdk/reports

0.3.0 runtime notes

  • Bug reports include optional occurrence frequency selection in native form.
  • UI strings are localized for en, tr, es, fr, de, pt, ar, hi, ja, and zh-Hans based on device language.
  • Unsupported languages automatically fall back to English.
  • Shake trigger listens to native iOS motion events.
  • Identified email is used to prefill the contact field when available.

UIKit projects

UIKit apps can call the same configuration from AppDelegate startup.