iosMain.com.myunidays.segmenkt.FirebaseIntegration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Segmenkt Show documentation
Show all versions of Segmenkt Show documentation
Kotlin Multiplatform Wrapper for Segment
The newest version!
package com.myunidays.segmenkt
import com.myunidays.segmenkt.integrations.AliasPayload
import com.myunidays.segmenkt.integrations.GroupPayload
import com.myunidays.segmenkt.integrations.IdentifyPayload
import com.myunidays.segmenkt.integrations.Integration
import com.myunidays.segmenkt.integrations.IntegrationFactory
import com.myunidays.segmenkt.integrations.ScreenPayload
import com.myunidays.segmenkt.integrations.TrackPayload
actual class FirebaseIntegration internal constructor(
private val ios: cocoapods.Analytics.SEGIntegrationProtocol
) : Integration {
override fun identify(identifyPayload: IdentifyPayload) = ios.identify(identifyPayload)
override fun group(groupPayload: GroupPayload) = ios.group(groupPayload)
override fun track(trackPayload: TrackPayload) = ios.track(trackPayload)
override fun alias(aliasPayload: AliasPayload) = ios.alias(aliasPayload)
override fun screen(screenPayload: ScreenPayload) = ios.screen(screenPayload)
override fun flush() = ios.flush()
override fun reset() = ios.reset()
@Suppress("EmptyFunctionBlock")
override fun debug(debug: Boolean) { }
actual companion object {
actual fun factory(
delegate: Any?,
deeplinkHandler: Any?
): IntegrationFactory =
cocoapods.Segment_Firebase.SEGFirebaseIntegrationFactory.Companion.instance()
as cocoapods.Analytics.SEGIntegrationFactoryProtocol
}
}