ThinkSDKUtil.swift 767 Bytes
//
//  ThinkSDKUtil.swift
//  hippo-watch Watch App
//
//  Created by shihao on 2025/7/17.
//

import Foundation
import ThinkingDataAnalyticsExtension

class ThinkSDKUtil {
    
    static func initSDK() {
#if DEBUG || CI_ENV
        TDAnalyticsExtension.start(withAppId: "1efaeef2c4c04a3bac557d78899ecee6", serverUrl: "https://ta-api.didiapp.com")
#else
        TDAnalyticsExtension.start(withAppId: "6e53fb7a8f5f483081c15b8f5f017401", serverUrl: "https://ta-api.didiapp.com")
#endif
    }
    
    static func track(eventName: String,
                      properties: [String: Any]? = nil) {
        TDAnalyticsExtension.track(eventName, properties: properties)
    }
    
    static func login(_ uid: Int) {
        TDAnalyticsExtension.login(uid.string)
    }
}