I am trying Firebase RemoteConfig sample with my iOS application. Sample is here: https://github.com/firebase/quickstart-ios/blob/b2e13eaa27b04567cbee3e758680a850bfd02188/config/LegacyConfigQuickstart/ConfigExample/ViewController.m
I am able to add Firebase Remote Config, A key and value on the console. I am able to retrieve the value first time (running app freshly) in my iOS application. This is working fine. My problem is, I want to update the value in Firebase console under Remote Config, i updated to a different value, but it doesn't get fetched in the app automatically or manually. Could someone guide, How to achieve this?
fetch code below.
- (void)fetchConfig {
_label1.text = self.remoteConfig[kLoadingPhraseConfigKey].stringValue;
long expirationDuration = 3600;
[self.remoteConfig fetchWithExpirationDuration:expirationDuration completionHandler:^(FIRRemoteConfigFetchStatus status, NSError *error) {
if (status == FIRRemoteConfigFetchStatusSuccess) {
[self.remoteConfig activateFetched];
NSString *result = self.remoteConfig[kWelcomeMessageConfigKey].stringValue;
NSLog(@"Config fetched. result: %@", result);
}
else {
NSLog(@"Config not fetched");
NSLog(@"Error %@", error.localizedDescription);
}
[self displayWelcome];
}];
}
- (void)displayWelcome {
NSString *welcomeMessage = self.remoteConfig[kWelcomeMessageConfigKey].stringValue;
if (self.remoteConfig[kWelcomeMessageCapsConfigKey].boolValue) {
welcomeMessage = [welcomeMessage uppercaseString];
}
_label1.text = welcomeMessage;
NSString *stringColor = self.remoteConfig[kIOSTitleColor].stringValue;
NSLog(@"stringColor: %@", stringColor);
UIColor *titleColor = [self colorWithHexString:stringColor];
_label1.backgroundColor = titleColor;
}
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/59660416-8991-46dd-ad9b-fc95e1a77b57o%40googlegroups.com.