All Downloads are FREE. Search and download functionalities are using the official Maven repository.

iosMain.com.revenuecat.purchases.kmp.mappings.CacheFetchPolicy.ios.kt Maven / Gradle / Ivy

There is a newer version: 1.3.2+13.9.0
Show newest version
package com.revenuecat.purchases.kmp.mappings

import cocoapods.PurchasesHybridCommon.RCCacheFetchPolicyCachedOrFetched
import cocoapods.PurchasesHybridCommon.RCCacheFetchPolicyFetchCurrent
import cocoapods.PurchasesHybridCommon.RCCacheFetchPolicyFromCacheOnly
import cocoapods.PurchasesHybridCommon.RCCacheFetchPolicyNotStaleCachedOrFetched
import com.revenuecat.purchases.kmp.models.CacheFetchPolicy
import cocoapods.PurchasesHybridCommon.RCCacheFetchPolicy as IosCacheFetchPolicy

public fun CacheFetchPolicy.toIosCacheFetchPolicy(): IosCacheFetchPolicy =
    when (this) {
        CacheFetchPolicy.CACHE_ONLY -> RCCacheFetchPolicyFromCacheOnly
        CacheFetchPolicy.FETCH_CURRENT -> RCCacheFetchPolicyFetchCurrent
        CacheFetchPolicy.NOT_STALE_CACHED_OR_CURRENT -> RCCacheFetchPolicyNotStaleCachedOrFetched
        CacheFetchPolicy.CACHED_OR_FETCHED -> RCCacheFetchPolicyCachedOrFetched
    }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy