ConfigManager

open class ConfigManager(context: Context, storeManager: StoreManager, entitlements: Entitlements, storage: Storage, network: SuperwallAPI, fullNetwork: Network? = null, deviceHelper: DeviceHelper, var options: SuperwallOptions, paywallManager: PaywallManager, webPaywallRedeemer: () -> WebPaywallRedeemer, factory: ConfigManager.Factory, assignments: Assignments, paywallPreload: PaywallPreload, ioScope: IOScope, track: suspend (InternalSuperwallEvent) -> Unit, testModeManager: TestModeManager? = null, identityManager: () -> IdentityManager? = null, activityProvider: ActivityProvider? = null, activityTracker: CurrentActivityTracker? = null, setSubscriptionStatus: (SubscriptionStatus) -> Unit? = null, awaitUtilNetwork: suspend () -> Unit = { context.awaitUntilNetworkExists() })(source)

Constructors

Link copied to clipboard
constructor(context: Context, storeManager: StoreManager, entitlements: Entitlements, storage: Storage, network: SuperwallAPI, fullNetwork: Network? = null, deviceHelper: DeviceHelper, options: SuperwallOptions, paywallManager: PaywallManager, webPaywallRedeemer: () -> WebPaywallRedeemer, factory: ConfigManager.Factory, assignments: Assignments, paywallPreload: PaywallPreload, ioScope: IOScope, track: suspend (InternalSuperwallEvent) -> Unit, testModeManager: TestModeManager? = null, identityManager: () -> IdentityManager? = null, activityProvider: ActivityProvider? = null, activityTracker: CurrentActivityTracker? = null, setSubscriptionStatus: (SubscriptionStatus) -> Unit? = null, awaitUtilNetwork: suspend () -> Unit = { context.awaitUntilNetworkExists() })

Properties

Link copied to clipboard
Link copied to clipboard
val hasConfig: Flow<Config>
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
suspend fun fetchConfiguration()
Link copied to clipboard
suspend fun getAssignments()
Link copied to clipboard
suspend fun preloadAllPaywalls()
Link copied to clipboard
suspend fun preloadPaywallsByNames(eventNames: Set<String>)
Link copied to clipboard
fun reevaluateTestMode(config: Config? = configState.value.getConfig(), appUserId: String? = null, aliasId: String? = null)

Re-evaluates test mode with the current identity and config. If test mode was active but the current user no longer qualifies, clears test mode and resets subscription status. If a new user qualifies, activates test mode and shows the modal.

Link copied to clipboard
fun reset()