Zixflow Core
// Initialize SDK
Zixflow.initialize(withConfig: SDKConfig)
// Identify user
Zixflow.shared.identify(userId: String, traits: [String: Any]?)
// Track event
Zixflow.shared.track(name: String, properties: [String: Any]?)
// Track screen
Zixflow.shared.screen(title: String, properties: [String: Any]?)
// Set profile attributes
Zixflow.shared.setProfileAttributes([String: Any])
// Set device attributes
Zixflow.shared.deviceAttributes = [String: Any]
// Clear user identification
Zixflow.shared.clearIdentify()
// Get device token
Zixflow.shared.registeredDeviceToken: String?
SDKConfigBuilder
SDKConfigBuilder(apiKey: String)
.logLevel(ZixflowLogLevel)
.autoTrackDeviceAttributes(Bool)
.trackApplicationLifecycleEvents(Bool)
.autoTrackUIKitScreenViews()
.screenViewUse(screenView: ScreenView)
.apiHost(String)
.cdnHost(String)
.flushAt(Int)
.flushInterval(Double)
.deepLinkCallback((URL) -> Bool)
.addModule(Module)
.build() -> SDKConfig
MessagingPushAPN
// Initialize
MessagingPushAPN.initialize(withConfig: MessagingPushConfig)
// Configuration
MessagingPushConfigBuilder()
.autoFetchDeviceToken(Bool)
.autoTrackPushEvents(Bool)
.showPushAppInForeground(Bool)
.appGroupId(String?)
.build() -> MessagingPushConfig
Location
// Configuration
LocationModule(config: LocationConfig)
LocationConfig(mode: LocationMode)
enum LocationMode {
case onAppStart // Request location on app launch
case onDemand // Request location manually
}
// Manual location update
Zixflow.location.requestLocationUpdate()
Zixflow.location.setLastKnownLocation(CLLocation)