Skip to content

Commit

Permalink
Merge pull request #534 from superles/master
Browse files Browse the repository at this point in the history
(iOS) Fix save RemoteConfig settings
  • Loading branch information
dpa99c authored Oct 10, 2020
2 parents af4d1c8 + 5573570 commit 0fe63fa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ios/FirebasePlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,8 @@ - (void)setCrashlyticsUserId:(CDVInvokedUrlCommand *)command {
- (void)setConfigSettings:(CDVInvokedUrlCommand*)command {
[self.commandDelegate runInBackground:^{
@try {
FIRRemoteConfig* remoteConfig = [FIRRemoteConfig remoteConfig];

FIRRemoteConfigSettings* settings = [[FIRRemoteConfigSettings alloc] init];

if([command.arguments objectAtIndex:0] != [NSNull null]){
Expand All @@ -1247,6 +1249,9 @@ - (void)setConfigSettings:(CDVInvokedUrlCommand*)command {
if([command.arguments objectAtIndex:1] != [NSNull null]){
settings.minimumFetchInterval = [[command.arguments objectAtIndex:1] longValue];
}

remoteConfig.configSettings = settings;

[self sendPluginSuccess:command];
}@catch (NSException *exception) {
[self handlePluginExceptionWithContext:exception :command];
Expand Down

0 comments on commit 0fe63fa

Please sign in to comment.