TraceVisionSDK

Process video to generate personal highlights

Overview

Note

Currently the TraceVisionSDK only supports filming soccer ⚽️ - more sports coming soon! 🏀🏐

There are 3 ways to use the TraceVisionSDK

Initializing the SDK

Before you start doing any processing with the SDK you need to initialize the SDK with your API token and secret that you got from TraceVision by calling initSDK(token:secret:) called on the shared instance of the SDK. Initialization is asynchronous and can take some time to complete after the initSDK(token:secret:) is finished. Observe isSDKInited to know when you can start using the SDK.

Note

You should initialize the SDK exactly once per app execution, so the good place to do it is in AppDelegate

class AppDelegate: NSObject, UIApplicationDelegate {
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
        // Initialize TraceVision SDK with your token and secret
        // This should be done only once when the app is launched
        TraceVision.shared.initSDK(token: "YOUR_VISION_TOKEN", secret: "YOUR_VISION_SECRET")

        TraceVision.shared.$isSDKInited.sink { inited in
            if inited == true {
                print("SDK is ready")
            }
        }.store(in: &cancellables)
    }
}

Topics

<!–@START_MENU_TOKEN@–>Group<!–@END_MENU_TOKEN@–>

  • <!–@START_MENU_TOKEN@–>Symbol<!–@END_MENU_TOKEN@–>