Using Performance together with Remote Config impedes the activation of Remote Config remote values #7179
Closed
Description
[REQUIRED] Step 1: Describe your environment
- Xcode version: 12.3
- Firebase SDK version: 7.3.0
- Installation method: CocoaPods
- Firebase Component: Remote Config, Performance
[REQUIRED] Step 2: Describe the problem
Steps to reproduce:
- The Remote Config is set up in
func application(_:didFinishLaunchingWithOptions:)
to activate the currently fetched remote values and after that fetches new remote values to activate at the next app start. - This means that from the second app start the activation method should activate the fetched remote values.
- When FirebasePerfomance is also installed, the fetching process succeeds as before but the activation process does not work anymore as expected.
- The
activateWithCompletion
completion handler gets called but itschanged
property is alwaysfalse
and callingconfig.allKeys(from: .remote)
always returns0
. This suggests that there are no remote values to be activated but there should be because the fetch completed successfully. - I could successfully fix this behaviour by removing
FirebasePerformance
.
Relevant Code:
func setupRemoteConfig() {
let config = RemoteConfig.remoteConfig()
config.setDefaults(fromPlist: "RemoteConfigDefaults")
config.activate(completion: { changed, _ in
if changed {
config.allKeys(from: .remote).forEach { key in
if let value = config[key].stringValue {
UserDefaults.standard.setValue(value, forKey: key)
}
}
}
})
config.fetch(completionHandler: nil)
}
Podfile:
Podfile.lock
PODS:
...
- Firebase/AdMob (7.3.0):
- Firebase/CoreOnly
- Google-Mobile-Ads-SDK (~> 7.66)
- Firebase/Analytics (7.3.0):
- Firebase/Core
- Firebase/Core (7.3.0):
- Firebase/CoreOnly
- FirebaseAnalytics (= 7.3.0)
- Firebase/CoreOnly (7.3.0):
- FirebaseCore (= 7.3.0)
- Firebase/Crashlytics (7.3.0):
- Firebase/CoreOnly
- FirebaseCrashlytics (~> 7.3.0)
- Firebase/Functions (7.3.0):
- Firebase/CoreOnly
- FirebaseFunctions (~> 7.3.0)
- Firebase/InAppMessaging (7.3.0):
- Firebase/CoreOnly
- FirebaseInAppMessaging (~> 7.3.0-beta)
- Firebase/Messaging (7.3.0):
- Firebase/CoreOnly
- FirebaseMessaging (~> 7.3.0)
- Firebase/Performance (7.3.0):
- Firebase/CoreOnly
- FirebasePerformance (~> 7.3.0)
- Firebase/RemoteConfig (7.3.0):
- Firebase/CoreOnly
- FirebaseRemoteConfig (~> 7.3.0)
- FirebaseABTesting (7.3.0):
- FirebaseCore (~> 7.0)
- FirebaseAnalytics (7.3.0):
- FirebaseCore (~> 7.0)
- FirebaseInstallations (~> 7.0)
- GoogleAppMeasurement (= 7.3.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.0)
- GoogleUtilities/MethodSwizzler (~> 7.0)
- GoogleUtilities/Network (~> 7.0)
- "GoogleUtilities/NSData+zlib (~> 7.0)"
- nanopb (~> 2.30906.0)
- FirebaseCore (7.3.0):
- FirebaseCoreDiagnostics (~> 7.0)
- GoogleUtilities/Environment (~> 7.0)
- GoogleUtilities/Logger (~> 7.0)
- FirebaseCoreDiagnostics (7.3.0):
- GoogleDataTransport (~> 8.0)
- GoogleUtilities/Environment (~> 7.0)
- GoogleUtilities/Logger (~> 7.0)
- nanopb (~> 2.30906.0)
- FirebaseCrashlytics (7.3.0):
- FirebaseCore (~> 7.0)
- FirebaseInstallations (~> 7.0)
- GoogleDataTransport (~> 8.0)
- nanopb (~> 2.30906.0)
- PromisesObjC (~> 1.2)
- FirebaseFunctions (7.3.0):
- FirebaseCore (~> 7.0)
- GTMSessionFetcher/Core (~> 1.4)
- FirebaseInAppMessaging (7.3.0-beta):
- FirebaseABTesting (~> 7.0)
- FirebaseCore (~> 7.0)
- FirebaseInstallations (~> 7.0)
- GoogleUtilities/Environment (~> 7.0)
- nanopb (~> 2.30906.0)
- FirebaseInstallations (7.3.0):
- FirebaseCore (~> 7.0)
- GoogleUtilities/Environment (~> 7.0)
- GoogleUtilities/UserDefaults (~> 7.0)
- PromisesObjC (~> 1.2)
- FirebaseInstanceID (7.3.0):
- FirebaseCore (~> 7.0)
- FirebaseInstallations (~> 7.0)
- GoogleUtilities/Environment (~> 7.0)
- GoogleUtilities/UserDefaults (~> 7.0)
- FirebaseMessaging (7.3.0):
- FirebaseCore (~> 7.0)
- FirebaseInstanceID (~> 7.0)
- GoogleUtilities/AppDelegateSwizzler (~> 7.0)
- GoogleUtilities/Environment (~> 7.0)
- GoogleUtilities/Reachability (~> 7.0)
- GoogleUtilities/UserDefaults (~> 7.0)
- FirebasePerformance (7.3.0):
- FirebaseCore (~> 7.0)
- FirebaseInstallations (~> 7.0)
- FirebaseRemoteConfig (~> 7.0)
- GoogleDataTransport (~> 8.1)
- GoogleToolboxForMac/Logger (~> 2.1)
- "GoogleToolboxForMac/NSData+zlib (~> 2.1)"
- GoogleUtilities/Environment (~> 7.0)
- GoogleUtilities/ISASwizzler (~> 7.0)
- GoogleUtilities/MethodSwizzler (~> 7.0)
- GTMSessionFetcher/Core (~> 1.1)
- Protobuf (~> 3.12)
- FirebaseRemoteConfig (7.3.0):
- FirebaseABTesting (~> 7.0)
- FirebaseCore (~> 7.0)
- FirebaseInstallations (~> 7.0)
- GoogleUtilities/Environment (~> 7.0)
- "GoogleUtilities/NSData+zlib (~> 7.0)"
- Google-Mobile-Ads-SDK (7.69.0):
- GoogleAppMeasurement (~> 7.0)
- GoogleUserMessagingPlatform (~> 1.1)
- GoogleAppMeasurement (7.3.0):
- GoogleUtilities/AppDelegateSwizzler (~> 7.0)
- GoogleUtilities/MethodSwizzler (~> 7.0)
- GoogleUtilities/Network (~> 7.0)
- "GoogleUtilities/NSData+zlib (~> 7.0)"
- nanopb (~> 2.30906.0)
- GoogleDataTransport (8.1.0):
- nanopb (~> 2.30906.0)
- GoogleToolboxForMac/Defines (2.3.0)
- GoogleToolboxForMac/Logger (2.3.0):
- GoogleToolboxForMac/Defines (= 2.3.0)
- "GoogleToolboxForMac/NSData+zlib (2.3.0)":
- GoogleToolboxForMac/Defines (= 2.3.0)
- GoogleUserMessagingPlatform (1.4.0)
- GoogleUtilities (7.1.1):
- GoogleUtilities/AppDelegateSwizzler (= 7.1.1)
- GoogleUtilities/Environment (= 7.1.1)
- GoogleUtilities/ISASwizzler (= 7.1.1)
- GoogleUtilities/Logger (= 7.1.1)
- GoogleUtilities/MethodSwizzler (= 7.1.1)
- GoogleUtilities/Network (= 7.1.1)
- "GoogleUtilities/NSData+zlib (= 7.1.1)"
- GoogleUtilities/Reachability (= 7.1.1)
- GoogleUtilities/SwizzlerTestHelpers (= 7.1.1)
- GoogleUtilities/UserDefaults (= 7.1.1)
- GoogleUtilities/AppDelegateSwizzler (7.1.1):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (7.1.1):
- PromisesObjC (~> 1.2)
- GoogleUtilities/ISASwizzler (7.1.1)
- GoogleUtilities/Logger (7.1.1):
- GoogleUtilities/Environment
- GoogleUtilities/MethodSwizzler (7.1.1):
- GoogleUtilities/Logger
- GoogleUtilities/Network (7.1.1):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (7.1.1)"
- GoogleUtilities/Reachability (7.1.1):
- GoogleUtilities/Logger
- GoogleUtilities/SwizzlerTestHelpers (7.1.1):
- GoogleUtilities/MethodSwizzler
- GoogleUtilities/UserDefaults (7.1.1):
- GoogleUtilities/Logger
- GTMSessionFetcher/Core (1.5.0)
- nanopb (2.30906.0):
- nanopb/decode (= 2.30906.0)
- nanopb/encode (= 2.30906.0)
- nanopb/decode (2.30906.0)
- nanopb/encode (2.30906.0)
...
- Protobuf (3.14.0)
DEPENDENCIES:
...
- Firebase/AdMob
- Firebase/Analytics
- Firebase/Core
- Firebase/Crashlytics
- Firebase/Functions
- Firebase/InAppMessaging
- Firebase/Messaging
- Firebase/Performance
- Firebase/RemoteConfig
- GoogleUtilities
...
SPEC REPOS:
https://github.com/CocoaPods/Specs.git:
...
- Firebase
- FirebaseABTesting
- FirebaseAnalytics
- FirebaseCore
- FirebaseCoreDiagnostics
- FirebaseCrashlytics
- FirebaseFunctions
- FirebaseInAppMessaging
- FirebaseInstallations
- FirebaseInstanceID
- FirebaseMessaging
- FirebasePerformance
- FirebaseRemoteConfig
- Google-Mobile-Ads-SDK
- GoogleAppMeasurement
- GoogleDataTransport
- GoogleToolboxForMac
- GoogleUserMessagingPlatform
- GoogleUtilities
- GTMSessionFetcher
- nanopb
...
- Protobuf
SPEC CHECKSUMS:
...
Firebase: 26223c695fe322633274198cb19dca8cb7e54416
FirebaseABTesting: 303b5366c0c75be479424e8935e2f475cf24ce21
FirebaseAnalytics: 2580c2d62535ae7b644143d48941fcc239ea897a
FirebaseCore: 4d3c72622ce0e2106aaa07bb4b2935ba2c370972
FirebaseCoreDiagnostics: d50e11039e5984d92c8a512be2395f13df747350
FirebaseCrashlytics: d31325312c92e2cb2f0386d589b9aa44e303d99b
FirebaseFunctions: 56b7275ad46d936b77b64ecacd306e77db7be251
FirebaseInAppMessaging: 9436b16bbd1fd02bcb50c25ed485150b3269d611
FirebaseInstallations: 971df89b48ae5ee4cc2bf6935f3857a525d28550
FirebaseInstanceID: 5ccdee6a84e6b4bb5316de0a8cd88bc749ba490d
FirebaseMessaging: 68d1bcb14880189558a8ae57167abe0b7e417232
FirebasePerformance: 7915b7dfc8258030d5fac9544d7fa6b55fbe3e57
FirebaseRemoteConfig: 826fad8bec5ce1912ef97a124d6ec0ce4dcf6ec1
Google-Mobile-Ads-SDK: 2f288748a42920d1c744946a460896a95b0e9110
GoogleAppMeasurement: 8d3c0aeede16ab7764144b5a4ca8e1d4323841b7
GoogleDataTransport: 116c84c4bdeb76be2a7a46de51244368f9794eab
GoogleToolboxForMac: 1350d40e86a76f7863928d63bcb0b89c84c521c5
GoogleUserMessagingPlatform: b168e8c46cd8f92aa3e34b584c4ca78a411ce367
GoogleUtilities: 3dc4ff0d5e4840e2fa8eef0889620e8c33d4218c
GTMSessionFetcher: b3503b20a988c4e20cc189aa798fd18220133f52
nanopb: 1bf24dd71191072e120b83dd02d08f3da0d65e53
...
Protobuf: 0cde852566359049847168e51bd1c690e0f70056
PODFILE CHECKSUM: 11163c2b7e65cd88d7da843f3d7bbb1026b002c2
COCOAPODS: 1.10.0