Analyzer
public class Analyzer : @unchecked Sendable
事件分析器
-
单例模式
Declaration
Swift
public static let shared: Analyzer
-
是否启用日志,默认调试开启,正式关闭
Declaration
Swift
public var isLogEnabled: Bool
-
Undocumented
Declaration
Swift
public init()
-
添加上报者
Declaration
Swift
public func addReporter(_ reporter: AnalysisReporter)
-
移除指定上报者
Declaration
Swift
public func removeReporter<T>(_ reporter: T) where T : AnalysisReporter, T : Equatable
-
移除所有上报者
Declaration
Swift
public func removeAllReporters()
-
初始化所有上报者,仅调用一次
Declaration
Swift
public func setupReporters()
-
跟踪上报公共参数,公共参数发生变化时调用
Declaration
Swift
public func trackParameters(_ parameters: [AnyHashable : Any]? = nil)
-
跟踪上报用户信息,用户信息发生变化时调用
Declaration
Swift
public func trackUser(_ parameters: [AnyHashable : Any]? = nil)
-
跟踪上报事件,支持分组,事件发生时调用
Declaration
Swift
public func trackEvent(group: String = "", _ name: String, parameters: [AnyHashable : Any]? = nil)
-
跟踪上报错误,支持分组,错误发生时调用
Declaration
Swift
public func trackError(group: String = "", _ name: String, error: Error, parameters: [AnyHashable : Any]? = nil)