Closed Reksagon closed 7 months ago
Have you called fetchAndActivate()
?
If not, create this in the shared
module (it could be done better, maybe without using GlobalScope)
// FirebaseUtils.kt
fun initFirebaseRemoteConfig() {
GlobalScope.launch {
Firebase.remoteConfig.settings {
minimumFetchIntervalInSeconds = 0
}
Firebase.remoteConfig.fetchAndActivate()
}
}
Then for the Android module
Add this to the manifest
<application
android:name=".MainApplication"
...
This in the Application file
// MainApplication.kt
class MainApplication : Application() {
override fun onCreate() {
super.onCreate()
// ..
Firebase.initialize(this)
initFirebaseRemoteConfig()
// ...
}
}
And this in the iOS module
// iOSApp.swift
import SwiftUI
import FirebaseCore
import shared
@main
struct iOSApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var delegate
init() {
// ...
FirebaseApp.configure()
FirebaseUtilsKt.initFirebaseRemoteConfig()
// ...
}
// ...
}
Closing as solution provided
does not receive data from the config, everything is ok in the native code, can something be done? somehow initialize or how? it is not clear, because there is no documentation