Initialization

After installing the SDK, initialize the app inside your Appdelegate file following the below-mentioned steps-

Import VWO_Insights

After, add the following Initialization code inside the function ->

func application( application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?)_

// From SDK version 2.2.0 and above, If your app is purely and fully written in SwiftUI, then feel free to pass isSwiftUI as true in the function below - 
//eg. VWO.configure(accountId: "", sdkKey: "", userId: "", isSwiftUI: true)

VWO.configure(accountId: "", sdkKey: "", userId: ""){ result in // where accountID and sdkKey are provided on the Wingify account
      switch result{
      case .success(_):
        print("VWO launched successfull")
        VWO.startSessionRecording() // For starting recording
      case .failure(let error):
        print("VWO launched failed \(error)")
      }
   }					

Parameters

KeyDescription
ACCOUNT_ID RequiredWingify Account ID
SDK_KEY
Required
SDK Key
USER_ID
Optional
Unique identifier for the user

An example implementation is for Swift

import UIKit
import VWO_Insights


@main
class AppDelegate: UIResponder, UIApplicationDelegate {
    
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        
        VWO.configure(accountId: "", sdkKey: "", userId: ""){ result in // where accountID and sdkKey are provided on the Wingify account
      switch result{
      case .success(_):
        print("VWO launched successfull")
        VWO.startSessionRecording() // For starting recording
      case .failure(let error):
        print("VWO launched failed \(error)")
      }
   }		
        
        return true
    }
}