Pulse FlightRecorder Docs
  • SDK Documentation
    • Pulse Labs FlightRecorder Documentation
      • iOS
        • Overview
        • Install the SDK
        • Get your API Key
        • SDK Configuration
          • Swift + SwiftUI
          • Swift + UIKit with Scenes
          • Swift + UIKit without Scenes
          • Objective-C with Scenes
          • Objective-C without Scenes
        • Create Custom Triggers
          • Capture Recording
          • Show the Introduction Screen
        • Update the SDK
        • Troubleshooting
      • Android
        • Overview
        • Install the SDK
        • Get your API Key
        • SDK Configuration
          • Kotlin
          • Java
        • Create Custom Triggers
          • Capture Recording
          • Show the Introduction Screen
        • Update the SDK
        • Troubleshooting
      • ReactNative
        • Install SDK for ReactNative iOS
        • Install SDK for ReactNative Android
        • Update the SDK
      • Flutter
        • Overview
        • Install the SDK
        • Get your API Key
        • SDK Configuration
        • Create Custom Triggers
          • Capture Recording
          • Show the Introduction Screen
      • In-app Surveys
        • Create Survey
        • Edit Survey
        • Launch Survey
        • Pause Survey
        • Survey Responses
        • Survey Styling
    • ⬅️FlightRecorder Home
Powered by GitBook
On this page
  1. SDK Documentation
  2. Pulse Labs FlightRecorder Documentation
  3. iOS
  4. SDK Configuration

Swift + UIKit without Scenes

If your application is written in Swift and uses UIKit as the entry point to the UI, and does not use Scenes, having an AppDelegate file, follow these steps: ​

  1. Open the AppDelegate file and add the import PulseLabsFlightRecorderSDK statement to the top of the file:

    AppDelegate.m
    import UIKit
    
    // Insert the import statement:
    import PulseLabsFlightRecorderSDK
    
    @main
    class AppDelegate: UIResponder, UIApplicationDelegate {
  2. Add the application(_:didFinishLaunchingWithOptions:) delegate method if it doesn't already exist, and then insertFlightRecorderSDK.start(apiKey: "YOUR_API_KEY") in the method as shown below, replacing the text "YOUR_API_KEY" with your own API key. There are also other parameters that are optionals: - customFontsLib: you can also create an instance of FlightRecorderCustomFontsLib as pass it here. The sdk then will use that font to decorate the native part of the feedback form

    AppDelegate.m
    // Create this method if it doesn't already exist
    func application(
        _ application: UIApplication,
        didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
    ) -> Bool {
        
        // Start the SDK
        FlightRecorderSDK.start(apiKey: "YOUR_API_KEY",
                        customFontsLib: FlightRecorderCustomFontsLib?)
        
        return true
    }
  3. Add the applicationDidBecomeActive(_:) delegate method if it doesn't already exist, and then insert the showIntroductionUI(displayOnlyOnce:) in the method as shown below. This will show the Introduction Screen on the first time application launch:

    AppDelegate.m
    // Create this method if it doesn't already exist
    func applicationDidBecomeActive(_ application: UIApplication) {
    
        // Insert here:
        do {
            try FlightRecorderSDK.showIntroductionUI(displayOnlyOnce: true)
        } catch {
            // Handle the error
        }
    
    }

The SDK is now installed! Run your app on a real device (the SDK will not work in a simulator) and the introduction screen will appear on the first run. You can then shake or take a screenshot to capture the video content and send a report.

Last updated 2 months ago

If you have any issues, head to the section.

Troubleshooting