In the iOS code below, the status of the fetch is FIRRemoteConfigFetchStatusSuccess. When activateFetched is applied in the handler, the result is true. It looks to me therefore as if it should be the case that you can access the remote config values from the server. However, it is only the local value that is obtained when do [FIRRemoteConfig remoteConfig][@"greeting"].stringValue;
On Firebase console have set a parameter called "greeting". What possible reasons are there to explain why it is not retrieving the server value for this parameter?
- (void)fetchFirebaseRemoteConfig {
long expirationDuration = 43200;
if ([FIRRemoteConfig remoteConfig].configSettings.isDeveloperModeEnabled) {
expirationDuration = 0;
}
[[FIRRemoteConfig remoteConfig] fetchWithExpirationDuration:expirationDuration completionHandler:^(FIRRemoteConfigFetchStatus status, NSError *error) {
if (status == FIRRemoteConfigFetchStatusSuccess && error == nil) {
BOOL didApply = [[FIRRemoteConfig remoteConfig] activateFetched];
ALog("Did apply remote config OK: %d", didApply);
} else {
ALog(@"Error %@", error.localizedDescription);
}
NSString *greeting = [FIRRemoteConfig remoteConfig][@"greeting"].stringValue;
ALog(@"greeting: %@", greeting);
}];
}