Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Commit

Permalink
Attribution functionality enableAdServicesAttributionTokenCollection (#…
Browse files Browse the repository at this point in the history
…10)

* Two new functionalities, collectDeviceIdentifiers(), and enableAdServicesAttributionTokenCollection()

* Updating readme

* Api update, and library version to 0.2.0
  • Loading branch information
mirzemehdi authored Apr 9, 2024
1 parent c5cad0e commit 3270d9d
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ fun logOut(onResult: (Result<CustomerInfo>) -> Unit)
fun getCustomerInfo(fetchPolicy: CacheFetchPolicy = CacheFetchPolicy.default(),onResult: (Result<CustomerInfo>) -> Unit)
fun setAttributes(attributes: Map<String,String?>)
fun setFirebaseAppInstanceID(firebaseAppInstanceID: String)
fun collectDeviceIdentifiers()
fun enableAdServicesAttributionTokenCollection()

```
### Purchases-UI
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ kotlin.mpp.enableCInteropCommonization=true
#Development
development=true

kmpRevenueCatVersion=0.1.0
kmpRevenueCatVersion=0.2.0
Original file line number Diff line number Diff line change
@@ -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 = ''
Expand Down
4 changes: 4 additions & 0 deletions kmprevenuecat-purchases/api/kmprevenuecat-purchases.api
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion kmprevenuecat-purchases/kmprevenuecat_purchases.podspec
Original file line number Diff line number Diff line change
@@ -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 = ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@ public interface Purchases {
}

public fun setFirebaseAppInstanceID(firebaseAppInstanceID: String)
public fun collectDeviceIdentifiers()
public fun enableAdServicesAttributionTokenCollection()

}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
}

}

0 comments on commit 3270d9d

Please sign in to comment.