diff --git a/README.md b/README.md index a2319db..4a30e01 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,8 @@ fun logOut(onResult: (Result) -> Unit) fun getCustomerInfo(fetchPolicy: CacheFetchPolicy = CacheFetchPolicy.default(),onResult: (Result) -> Unit) fun setAttributes(attributes: Map) fun setFirebaseAppInstanceID(firebaseAppInstanceID: String) +fun collectDeviceIdentifiers() +fun enableAdServicesAttributionTokenCollection() ``` ### Purchases-UI diff --git a/gradle.properties b/gradle.properties index 9fa9f59..23b11e8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,4 +18,4 @@ kotlin.mpp.enableCInteropCommonization=true #Development development=true -kmpRevenueCatVersion=0.1.0 \ No newline at end of file +kmpRevenueCatVersion=0.2.0 \ No newline at end of file diff --git a/kmprevenuecat-purchases-ui/kmprevenuecat_purchases_ui.podspec b/kmprevenuecat-purchases-ui/kmprevenuecat_purchases_ui.podspec index b581cfa..3e822f1 100644 --- a/kmprevenuecat-purchases-ui/kmprevenuecat_purchases_ui.podspec +++ b/kmprevenuecat-purchases-ui/kmprevenuecat_purchases_ui.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'kmprevenuecat_purchases_ui' - spec.version = '0.1.0' + spec.version = '0.2.0' spec.homepage = '' spec.source = { :http=> ''} spec.authors = '' diff --git a/kmprevenuecat-purchases/api/kmprevenuecat-purchases.api b/kmprevenuecat-purchases/api/kmprevenuecat-purchases.api index db3938c..e8c093b 100644 --- a/kmprevenuecat-purchases/api/kmprevenuecat-purchases.api +++ b/kmprevenuecat-purchases/api/kmprevenuecat-purchases.api @@ -38,7 +38,9 @@ public final class com/mmk/kmprevenuecat/purchases/Mapper_androidKt { public abstract interface class com/mmk/kmprevenuecat/purchases/Purchases { public static final field Companion Lcom/mmk/kmprevenuecat/purchases/Purchases$Companion; + public abstract fun collectDeviceIdentifiers ()V public abstract fun configure (Ljava/lang/String;Ljava/lang/String;)V + public abstract fun enableAdServicesAttributionTokenCollection ()V public abstract fun getCustomerInfo (Lcom/mmk/kmprevenuecat/purchases/CacheFetchPolicy;Lkotlin/jvm/functions/Function1;)V public abstract fun getLogLevel ()Lcom/mmk/kmprevenuecat/purchases/LogLevel; public abstract fun logOut (Lkotlin/jvm/functions/Function1;)V @@ -49,7 +51,9 @@ public abstract interface class com/mmk/kmprevenuecat/purchases/Purchases { } public final class com/mmk/kmprevenuecat/purchases/Purchases$Companion : com/mmk/kmprevenuecat/purchases/Purchases { + public fun collectDeviceIdentifiers ()V public fun configure (Ljava/lang/String;Ljava/lang/String;)V + public fun enableAdServicesAttributionTokenCollection ()V public fun getCustomerInfo (Lcom/mmk/kmprevenuecat/purchases/CacheFetchPolicy;Lkotlin/jvm/functions/Function1;)V public fun getLogLevel ()Lcom/mmk/kmprevenuecat/purchases/LogLevel; public fun logOut (Lkotlin/jvm/functions/Function1;)V diff --git a/kmprevenuecat-purchases/kmprevenuecat_purchases.podspec b/kmprevenuecat-purchases/kmprevenuecat_purchases.podspec index fb6fab2..990bc23 100644 --- a/kmprevenuecat-purchases/kmprevenuecat_purchases.podspec +++ b/kmprevenuecat-purchases/kmprevenuecat_purchases.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'kmprevenuecat_purchases' - spec.version = '0.1.0' + spec.version = '0.2.0' spec.homepage = '' spec.source = { :http=> ''} spec.authors = '' diff --git a/kmprevenuecat-purchases/src/androidMain/kotlin/com/mmk/kmprevenuecat/purchases/PurchasesImpl.kt b/kmprevenuecat-purchases/src/androidMain/kotlin/com/mmk/kmprevenuecat/purchases/PurchasesImpl.kt index fbaad9c..c1de39c 100644 --- a/kmprevenuecat-purchases/src/androidMain/kotlin/com/mmk/kmprevenuecat/purchases/PurchasesImpl.kt +++ b/kmprevenuecat-purchases/src/androidMain/kotlin/com/mmk/kmprevenuecat/purchases/PurchasesImpl.kt @@ -78,4 +78,9 @@ internal class PurchasesImpl(private val context: Context) : Purchases { RevenueCatPurchases.sharedInstance.setFirebaseAppInstanceID(firebaseAppInstanceID) } + override fun collectDeviceIdentifiers() { + RevenueCatPurchases.sharedInstance.collectDeviceIdentifiers() + } + + override fun enableAdServicesAttributionTokenCollection() = Unit } \ No newline at end of file diff --git a/kmprevenuecat-purchases/src/commonMain/kotlin/com/mmk/kmprevenuecat/purchases/Purchases.kt b/kmprevenuecat-purchases/src/commonMain/kotlin/com/mmk/kmprevenuecat/purchases/Purchases.kt index 3636b72..1275172 100644 --- a/kmprevenuecat-purchases/src/commonMain/kotlin/com/mmk/kmprevenuecat/purchases/Purchases.kt +++ b/kmprevenuecat-purchases/src/commonMain/kotlin/com/mmk/kmprevenuecat/purchases/Purchases.kt @@ -35,5 +35,7 @@ public interface Purchases { } public fun setFirebaseAppInstanceID(firebaseAppInstanceID: String) + public fun collectDeviceIdentifiers() + public fun enableAdServicesAttributionTokenCollection() } diff --git a/kmprevenuecat-purchases/src/iosMain/kotlin/com/mmk/kmprevenuecat/purchases/PurchasesImpl.kt b/kmprevenuecat-purchases/src/iosMain/kotlin/com/mmk/kmprevenuecat/purchases/PurchasesImpl.kt index 1f2b422..03cde0e 100644 --- a/kmprevenuecat-purchases/src/iosMain/kotlin/com/mmk/kmprevenuecat/purchases/PurchasesImpl.kt +++ b/kmprevenuecat-purchases/src/iosMain/kotlin/com/mmk/kmprevenuecat/purchases/PurchasesImpl.kt @@ -2,6 +2,7 @@ package com.mmk.kmprevenuecat.purchases import cocoapods.RevenueCat.RCPurchases import cocoapods.RevenueCat.configureWithAPIKey +import cocoapods.RevenueCat.enableAdServicesAttributionTokenCollection import com.mmk.kmprevenuecat.purchases.data.CustomerInfo import com.mmk.kmprevenuecat.purchases.data.LogInResult import kotlinx.cinterop.ExperimentalForeignApi @@ -72,4 +73,13 @@ internal class PurchasesImpl : Purchases { override fun setFirebaseAppInstanceID(firebaseAppInstanceID: String){ RCPurchases.sharedPurchases().setFirebaseAppInstanceID(firebaseAppInstanceID) } + + override fun collectDeviceIdentifiers() { + RCPurchases.sharedPurchases().collectDeviceIdentifiers() + } + + override fun enableAdServicesAttributionTokenCollection() { + RCPurchases.sharedPurchases().attribution().enableAdServicesAttributionTokenCollection() + } + } \ No newline at end of file