Zixflow core (ZixflowDataPipelines)
Zixflow.initialize(withConfig: SDKConfigBuilderResult)
Zixflow.shared: Zixflow
Zixflow.version: String
Zixflow.shared.identify(userId: String, traits: [String: Any]?)
Zixflow.shared.clearIdentify()
Zixflow.shared.setProfileAttributes([String: Any])
Zixflow.shared.setDeviceAttributes([String: Any])
Zixflow.shared.track(name: String)
Zixflow.shared.track(name: String, properties: [String: Any]?)
Zixflow.shared.screen(title: String, properties: [String: Any]?)
Zixflow.shared.screen(title: String, category: String?)
Zixflow.shared.screen(title: String, category: String?, properties: [String: Any]?)
Zixflow.shared.alias(newId: String)
Zixflow.shared.anonymousId: String
Zixflow.shared.userId: String?
Zixflow.shared.flush(completion: (() -> Void)?)
Zixflow.shared.reset()
Zixflow.shared.registeredDeviceToken: String?
Zixflow.shared.registerDeviceToken(String)
Zixflow.shared.deleteDeviceToken()
Zixflow.shared.trackMetric(deliveryID: String, event: Metric, deviceToken: String)
Metric: .delivered, .opened, .converted
SDKConfigBuilder
SDKConfigBuilder(apiKey: String)
.region(Region) // .US, .EU
.logLevel(ZixflowLogLevel) // .none, .error, .info, .debug
.apiHost(String)
.cdnHost(String)
.flushAt(Int) // default 20
.flushInterval(Seconds) // default 30
.trackApplicationLifecycleEvents(Bool) // default true
.autoTrackDeviceAttributes(Bool) // default true
.autoTrackUIKitScreenViews(...)
.screenViewUse(screenView: ScreenView) // .all, .inApp
.siteId(String) // legacy migration
.deepLinkCallback((URL) -> Bool)
.addModule(ZixflowModule)
.build()
MessagingPushAPN (ZixflowMessagingPushAPN)
MessagingPush and config types are re-exported from this module.
MessagingPushAPN.initialize(withConfig: MessagingPushConfigOptions)
MessagingPushAPN.initializeForExtension(withConfig: MessagingPushConfigOptions)
MessagingPushConfigBuilder()
.autoFetchDeviceToken(Bool)
.autoTrackPushEvents(Bool)
.showPushAppInForeground(Bool)
.appGroupId(String)
.logLevel(ZixflowLogLevel)
.build()
// Prefer MessagingPush.shared (MessagingPushAPN.shared is internal)
MessagingPush.shared.registerDeviceToken(apnDeviceToken: Data)
MessagingPush.shared.deleteDeviceToken()
MessagingPush.shared.trackMetric(deliveryID: String, event: Metric, deviceToken: String)
MessagingPush.shared.didReceive(UNNotificationRequest, withContentHandler:)
MessagingPush.shared.serviceExtensionTimeWillExpire()
MessagingPush.shared.userNotificationCenter(_:didReceive:withCompletionHandler:)
ZixflowAppDelegateWrapper<YourAppDelegate>
MessagingPushFCM (ZixflowMessagingPushFCM)
MessagingPush.initialize(withConfig: MessagingPushConfigOptions)
MessagingPushFCM.initializeForExtension(withConfig: MessagingPushConfigOptions)
MessagingPushFCM.internalSetup(withConfig:firebaseService:) // advanced FirebaseService adapter
MessagingPush.shared.registerDeviceToken(fcmToken: String?)
MessagingPush.shared.messaging(_:didReceiveRegistrationToken:)
MessagingPush.shared.didReceive(UNNotificationRequest, withContentHandler:)
MessagingPush.shared.serviceExtensionTimeWillExpire()
MessagingInApp (ZixflowMessagingInApp)
MessagingInApp.initialize(withConfig: MessagingInAppConfigOptions)
MessagingInAppConfigBuilder().build()
MessagingInApp.shared.setEventListener(InAppEventListener?)
MessagingInApp.shared.dismissMessage()
MessagingInApp.shared.inbox: NotificationInbox
// InAppEventListener
messageShown(message:)
messageDismissed(message:)
errorWithMessage(message:)
messageActionTaken(message:actionValue:actionName:)
// Inline UI
InlineMessage(elementId:onActionClick:) // SwiftUI
InlineMessageUIView(elementId:) // UIKit
// Inbox
inbox.getMessages(topic:) async -> [InboxMessage]
inbox.messages(topic:) -> AsyncStream<[InboxMessage]>
inbox.markMessageOpened(message:)
inbox.markMessageUnopened(message:)
inbox.markMessageDeleted(message:)
inbox.trackMessageClicked(message:actionName:)
inbox.addChangeListener(_:topic:)
inbox.removeChangeListener(_:)
Location (ZixflowLocation)
LocationModule(config: LocationConfig)
LocationConfig(mode: LocationTrackingMode)
enum LocationTrackingMode {
case off
case manual
case onAppStart
}
Zixflow.location.requestLocationUpdate()
Zixflow.location.setLastKnownLocation(CLLocation)