Начало работы с Firebase Remote Config


Вы можете использовать Firebase Remote Config для определения параметров в вашем приложении и обновить их значения в облаке, что позволяет вам изменять внешний вид и поведение вашего приложения без распространения обновления приложения. Это руководство проходит через шаги, чтобы начать работу и предоставляет некоторый пример кода, который доступен для клонирования или загрузки с репозитория Firebase/QuickStart-IOIS GitHub.

Шаг 1: Добавьте Remote Config в ваше приложение

  1. Если вы еще этого не сделали, добавьте Firebase в свой Apple Project .

  2. Для Remote Config Google Analytics требуется для условного нацеливания экземпляров приложений на свойства пользователя и аудиторию. Убедитесь, что вы включите Google Analytics в свой проект.

  3. Создайте объект Remote Config Singleton, как показано в следующем примере:

    Быстрый

    remoteConfig = RemoteConfig.remoteConfig()
    let settings = RemoteConfigSettings()
    settings.minimumFetchInterval = 0
    remoteConfig.configSettings = settings

    Цель-C

    self.remoteConfig = [FIRRemoteConfig remoteConfig];
    FIRRemoteConfigSettings *remoteConfigSettings = [[FIRRemoteConfigSettings alloc] init];
    remoteConfigSettings.minimumFetchInterval = 0;
    self.remoteConfig.configSettings = remoteConfigSettings;

Этот объект используется для хранения значений параметров по умолчанию в приложении, получения обновленных значений параметров из Remote Config и управления, когда извлеченные значения доступны для вашего приложения.

Во время разработки рекомендуется установить относительно низкий минимальный интервал выборки. Смотрите дросселирование для получения дополнительной информации.

Шаг 2: Установите значения параметров по умолчанию в приложении

Вы можете установить значения параметров по умолчанию в приложении в объекте Remote Config , чтобы ваше приложение ведет себя так, как задумано, прежде чем подключиться к Remote Config , и поэтому значения по умолчанию доступны, если их не установлены в бэкэнд.

  1. Определите набор имен параметров и значения параметров по умолчанию, используя объект NSDictionary или файл PLIST .

    Если вы уже настроили значения параметров Remote Config , вы можете загрузить сгенерированный файл plist , который включает все значения по умолчанию и сохранить его в вашем проекте XCode.

    ОТДЫХ

    curl --compressed -D headers -H "Authorization: Bearer token -X GET https://firebaseremoteconfig.googleapis.com/v1/projects/my-project-id/remoteConfig:downloadDefaults?format=PLIST -o RemoteConfigDefaults.plist
    

    Консоль Firebase

    1. На вкладке «Параметры» откройте меню и выберите «Значения по умолчанию» .

    2. При запросе, включите .plist для iOS , затем нажмите файл загрузки .

  2. Добавьте эти значения в объект Remote Config используя setDefaults: . В следующем примере устанавливает значения по умолчанию в приложении из файла PLIST:

    Быстрый

    remoteConfig.setDefaults(fromPlist: "RemoteConfigDefaults")

    Цель-C

    [self.remoteConfig setDefaultsFromPlistFileName:@"RemoteConfigDefaults"];

Шаг 3: Получите значения параметров для использования в вашем приложении

Теперь вы можете получить значения параметров из объекта Remote Config . Если вы позже установите значения в бэкэнд Remote Config , принесите их, а затем активируйте их, эти значения доступны для вашего приложения. В противном случае вы получаете значения параметров в приложении, настроенные с использованием setDefaults: . Чтобы получить эти значения, вызовите configValueForKey: метод, предоставляя ключ параметра в качестве аргумента.

Шаг 4: Установите значения параметров

Используя консоль Firebase или API-интерфейсы Remote Config , вы можете создать новые значения бэкэнд по умолчанию, которые переопределяют значения в приложении в соответствии с вашей желаемой условной логикой или таргетингом пользователя. Этот раздел проходит через шаги консоли Firebase для создания этих значений.

  1. В консоли Firebase откройте свой проект.
  2. Выберите Remote Config в меню, чтобы просмотреть Remote Config .
  3. Определите параметры с теми же именами, что и параметры, которые вы определили в вашем приложении. Для каждого параметра вы можете установить значение по умолчанию (которое в конечном итоге будет переопределить значение по умолчанию в приложении), и вы также можете установить условные значения. Чтобы узнать больше, см. Remote Config .

Шаг 5: Принесите и активируйте значения

Чтобы получить значения параметров из Remote Config , вызовите fetchWithCompletionHandler: или fetchWithExpirationDuration:completionHandler: Метод. Любые значения, которые вы устанавливаете на бэкэнде, извлекаются и кэшируются в объекте Remote Config .

Для тех случаев, когда вы хотите получить и активировать значения за один вызов, используйте fetchAndActivateWithCompletionHandler: .

Этот пример извлекает значения из Remote Config (не кэшированных значений) и вызовов activateWithCompletionHandler: чтобы сделать их доступными для приложения:

Быстрый

remoteConfig.fetch { (status, error) -> Void in
  if status == .success {
    print("Config fetched!")
    self.remoteConfig.activate { changed, error in
      // ...
    }
  } else {
    print("Config not fetched")
    print("Error: \(error?.localizedDescription ?? "No error available.")")
  }
  self.displayWelcome()
}

Цель-C

[self.remoteConfig fetchWithCompletionHandler:^(FIRRemoteConfigFetchStatus status, NSError *error) {
    if (status == FIRRemoteConfigFetchStatusSuccess) {
        NSLog(@"Config fetched!");
      [self.remoteConfig activateWithCompletion:^(BOOL changed, NSError * _Nullable error) {
        if (error != nil) {
          NSLog(@"Activate error: %@", error.localizedDescription);
        } else {
          dispatch_async(dispatch_get_main_queue(), ^{
            [self displayWelcome];
          });
        }
      }];
    } else {
        NSLog(@"Config not fetched");
        NSLog(@"Error %@", error.localizedDescription);
    }
}];

Поскольку эти обновленные значения параметров влияют на поведение и внешний вид вашего приложения, вы должны активировать извлекаемые значения за раз, которые обеспечивают плавный опыт для вашего пользователя, например, в следующий раз, когда пользователь открывает ваше приложение. См. Удаленную стратегии загрузки конфигурации для получения дополнительной информации и примеров.

Шаг 6: Слушайте обновления в режиме реального времени

После того, как вы получите значения параметров, вы можете использовать Remote Config в реальном времени для прослушивания обновлений из Remote Config . Remote Config в реальном времени на подключенные устройства, когда доступны обновления, и автоматически получает изменения после публикации новой версии Remote Config .

Обновления в реальном времени поддерживаются Firebase SDK для Apple Platforms V10.7.0+ и выше.

  1. В вашем приложении вызовите addOnConfigUpdateListener чтобы начать прослушивание обновлений и автоматически приносить любые новые или обновленные значения параметров. В следующем примере прослушивается обновления, и при вызове activateWithCompletionHandler используется вновь извлеченные значения для отображения обновленного приветственного сообщения.

    Быстрый

    remoteConfig.addOnConfigUpdateListener { configUpdate, error in
      guard let configUpdate, error == nil else {
        print("Error listening for config updates: \(error)")
      }
    
      print("Updated keys: \(configUpdate.updatedKeys)")
    
      self.remoteConfig.activate { changed, error in
        guard error == nil else { return self.displayError(error) }
        DispatchQueue.main.async {
          self.displayWelcome()
        }
      }
    }

    Цель-C

    __weak __typeof__(self) weakSelf = self;
    [self.remoteConfig addOnConfigUpdateListener:^(FIRRemoteConfigUpdate * _Nonnull configUpdate, NSError * _Nullable error) {
      if (error != nil) {
        NSLog(@"Error listening for config updates %@", error.localizedDescription);
      } else {
        NSLog(@"Updated keys: %@", configUpdate.updatedKeys);
    
        __typeof__(self) strongSelf = weakSelf;
        [strongSelf.remoteConfig activateWithCompletion:^(BOOL changed, NSError * _Nullable error) {
          if (error != nil) {
            NSLog(@"Activate error %@", error.localizedDescription);
          }
    
          dispatch_async(dispatch_get_main_queue(), ^{
            [strongSelf displayWelcome];
          });
        }];
      }
    }];
  2. В следующий раз, когда вы публикуете новую версию вашей Remote Config , устройств, которые запускают ваше приложение и прислушиваются к изменениям, вызовут обработчик завершения.

Дросселя

Если приложение приносит слишком много раз за короткий период, вызовы Feetch задушен, а SDK возвращает FIRRemoteConfigFetchStatusThrottled . Перед версией SDK 6.3.0 лимит был 5 запросов избрать в 60 -минутном окне (более новые версии имеют больше разрешающих пределов).

Во время разработки приложений вы, возможно, захотите получать чаще, чтобы очень часто обновлять кэш (много раз в час), чтобы вы быстро обращались при разработке и тестировании своего приложения. Обновления удаленного конфигурации в реальном времени автоматически обходят кэш, когда конфигурация обновляется на сервере. Чтобы приспособиться к быстрой итерации в проекте с многочисленными разработчиками, вы можете временно добавить свойство FIRRemoteConfigSettings с низким минимальным интервалом извлечения ( MinimumFetchInterval ) в вашем приложении.

По умолчанию и рекомендованному интервалу производства для Remote Config составляют 12 часов, что означает, что конфигурации не будут извлечены из бэкэнд более одного раза в 12 -часовом окне, независимо от того, сколько вызовов фактически сделано. В частности, минимальный интервал выборки определяется в следующем порядке:

  1. Параметр в fetch(long)
  2. Параметр в FIRRemoteConfigSettings.MinimumFetchInterval
  3. Значение по умолчанию 12 часов

Следующие шаги

Если вы еще этого не сделали, изучите варианты использования Remote Config и посмотрите на некоторые из ключевых концепций и документации «Расширенные стратегии», в том числе:

,


You can use Firebase Remote Config to define parameters in your app and update their values in the cloud, allowing you to modify the appearance and behavior of your app without distributing an app update. This guide walks you through the steps to get started and provides some sample code, all of which is available to clone or download from the firebase/quickstart-ios GitHub repository.

Step 1: Add Remote Config to your app

  1. If you haven't already, add Firebase to your Apple project .

  2. For Remote Config , Google Analytics is required for the conditional targeting of app instances to user properties and audiences. Make sure that you enable Google Analytics in your project.

  3. Create the singleton Remote Config object, as shown in the following example:

    Быстрый

    remoteConfig = RemoteConfig.remoteConfig()
    let settings = RemoteConfigSettings()
    settings.minimumFetchInterval = 0
    remoteConfig.configSettings = settings

    Цель-C

    self.remoteConfig = [FIRRemoteConfig remoteConfig];
    FIRRemoteConfigSettings *remoteConfigSettings = [[FIRRemoteConfigSettings alloc] init];
    remoteConfigSettings.minimumFetchInterval = 0;
    self.remoteConfig.configSettings = remoteConfigSettings;

This object is used to store in-app default parameter values, fetch updated parameter values from the Remote Config backend, and control when fetched values are made available to your app.

During development, it's recommended to set a relatively low minimum fetch interval. See Throttling for more information.

Step 2: Set in-app default parameter values

You can set in-app default parameter values in the Remote Config object, so that your app behaves as intended before it connects to the Remote Config backend, and so that default values are available if none are set in the backend.

  1. Define a set of parameter names, and default parameter values using an NSDictionary object or a plist file .

    If you have already configured Remote Config backend parameter values, you can download a generated plist file that includes all default values and save it to your Xcode project.

    ОТДЫХ

    curl --compressed -D headers -H "Authorization: Bearer token -X GET https://firebaseremoteconfig.googleapis.com/v1/projects/my-project-id/remoteConfig:downloadDefaults?format=PLIST -o RemoteConfigDefaults.plist
    

    Firebase console

    1. In the Parameters tab, open the Menu , and select Download default values .

    2. When prompted, enable .plist for iOS , then click Download file .

  2. Add these values to the Remote Config object using setDefaults: . The following example sets in-app default values from a plist file:

    Быстрый

    remoteConfig.setDefaults(fromPlist: "RemoteConfigDefaults")

    Цель-C

    [self.remoteConfig setDefaultsFromPlistFileName:@"RemoteConfigDefaults"];

Step 3: Get parameter values to use in your app

Now you can get parameter values from the Remote Config object. If you later set values in the Remote Config backend, fetch them, and then activate them, those values are available to your app. Otherwise, you get the in-app parameter values configured using setDefaults: . To get these values, call the configValueForKey: method, providing the parameter key as an argument.

Step 4: Set parameter values

Using the Firebase console or the Remote Config backend APIs , you can create new backend default values that override the in-app values according to your desired conditional logic or user targeting. This section walks you through the Firebase console steps to create these values.

  1. In the Firebase console , open your project.
  2. Select Remote Config from the menu to view the Remote Config dashboard.
  3. Define parameters with the same names as the parameters that you defined in your app. For each parameter, you can set a default value (which will eventually override the in-app default value) and you can also set conditional values. To learn more, see Remote Config Parameters and Conditions .

Step 5: Fetch and activate values

To fetch parameter values from Remote Config , call the fetchWithCompletionHandler: or fetchWithExpirationDuration:completionHandler: method. Any values that you set on the backend are fetched and cached in the Remote Config object.

For cases where you want to fetch and activate values in one call, use fetchAndActivateWithCompletionHandler: .

This example fetches values from the Remote Config backend (not cached values) and calls activateWithCompletionHandler: to make them available to the app:

Быстрый

remoteConfig.fetch { (status, error) -> Void in
  if status == .success {
    print("Config fetched!")
    self.remoteConfig.activate { changed, error in
      // ...
    }
  } else {
    print("Config not fetched")
    print("Error: \(error?.localizedDescription ?? "No error available.")")
  }
  self.displayWelcome()
}

Цель-C

[self.remoteConfig fetchWithCompletionHandler:^(FIRRemoteConfigFetchStatus status, NSError *error) {
    if (status == FIRRemoteConfigFetchStatusSuccess) {
        NSLog(@"Config fetched!");
      [self.remoteConfig activateWithCompletion:^(BOOL changed, NSError * _Nullable error) {
        if (error != nil) {
          NSLog(@"Activate error: %@", error.localizedDescription);
        } else {
          dispatch_async(dispatch_get_main_queue(), ^{
            [self displayWelcome];
          });
        }
      }];
    } else {
        NSLog(@"Config not fetched");
        NSLog(@"Error %@", error.localizedDescription);
    }
}];

Because these updated parameter values affect the behavior and appearance of your app, you should activate the fetched values at a time that ensures a smooth experience for your user, such as the next time that the user opens your app. See Remote Config loading strategies for more information and examples.

Step 6: Listen for updates in real time

After you fetch parameter values, you can use real-time Remote Config to listen for updates from the Remote Config backend. Real-time Remote Config signals to connected devices when updates are available and automatically fetches the changes after you publish a new Remote Config version.

Real-time updates are supported by the Firebase SDK for Apple platforms v10.7.0+ and higher.

  1. In your app, call addOnConfigUpdateListener to start listening for updates and automatically fetch any new or updated parameter values. The following example listens for updates and when activateWithCompletionHandler is called, uses the newly fetched values to display an updated welcome message.

    Быстрый

    remoteConfig.addOnConfigUpdateListener { configUpdate, error in
      guard let configUpdate, error == nil else {
        print("Error listening for config updates: \(error)")
      }
    
      print("Updated keys: \(configUpdate.updatedKeys)")
    
      self.remoteConfig.activate { changed, error in
        guard error == nil else { return self.displayError(error) }
        DispatchQueue.main.async {
          self.displayWelcome()
        }
      }
    }

    Цель-C

    __weak __typeof__(self) weakSelf = self;
    [self.remoteConfig addOnConfigUpdateListener:^(FIRRemoteConfigUpdate * _Nonnull configUpdate, NSError * _Nullable error) {
      if (error != nil) {
        NSLog(@"Error listening for config updates %@", error.localizedDescription);
      } else {
        NSLog(@"Updated keys: %@", configUpdate.updatedKeys);
    
        __typeof__(self) strongSelf = weakSelf;
        [strongSelf.remoteConfig activateWithCompletion:^(BOOL changed, NSError * _Nullable error) {
          if (error != nil) {
            NSLog(@"Activate error %@", error.localizedDescription);
          }
    
          dispatch_async(dispatch_get_main_queue(), ^{
            [strongSelf displayWelcome];
          });
        }];
      }
    }];
  2. The next time you publish a new version of your Remote Config , devices that are running your app and listening for changes will call the completion handler.

Throttling

If an app fetches too many times in a short time period, fetch calls are throttled and the SDK returns FIRRemoteConfigFetchStatusThrottled . Before SDK version 6.3.0, the limit was 5 fetch requests in a 60 minute window (newer versions have more permissive limits).

During app development,you might want to fetch more often to refresh the cache very frequently (many times per hour) to let you rapidly iterate as you develop and test your app. Real-time Remote Config updates automatically bypass the cache when the config is updated on the server. To accommodate rapid iteration on a project with numerous developers, you can temporarily add a FIRRemoteConfigSettings property with a low minimum fetch interval ( MinimumFetchInterval ) in your app.

The default and recommended production fetch interval for Remote Config is 12 hours, which means that configs won't be fetched from the backend more than once in a 12 hour window, regardless of how many fetch calls are actually made. Specifically, the minimum fetch interval is determined in this following order:

  1. The parameter in fetch(long)
  2. The parameter in FIRRemoteConfigSettings.MinimumFetchInterval
  3. The default value of 12 hours

Следующие шаги

If you haven't already, explore the Remote Config use cases , and take a look at some of the key concepts and advanced strategies documentation, including:

,


You can use Firebase Remote Config to define parameters in your app and update their values in the cloud, allowing you to modify the appearance and behavior of your app without distributing an app update. This guide walks you through the steps to get started and provides some sample code, all of which is available to clone or download from the firebase/quickstart-ios GitHub repository.

Step 1: Add Remote Config to your app

  1. If you haven't already, add Firebase to your Apple project .

  2. For Remote Config , Google Analytics is required for the conditional targeting of app instances to user properties and audiences. Make sure that you enable Google Analytics in your project.

  3. Create the singleton Remote Config object, as shown in the following example:

    Быстрый

    remoteConfig = RemoteConfig.remoteConfig()
    let settings = RemoteConfigSettings()
    settings.minimumFetchInterval = 0
    remoteConfig.configSettings = settings

    Цель-C

    self.remoteConfig = [FIRRemoteConfig remoteConfig];
    FIRRemoteConfigSettings *remoteConfigSettings = [[FIRRemoteConfigSettings alloc] init];
    remoteConfigSettings.minimumFetchInterval = 0;
    self.remoteConfig.configSettings = remoteConfigSettings;

This object is used to store in-app default parameter values, fetch updated parameter values from the Remote Config backend, and control when fetched values are made available to your app.

During development, it's recommended to set a relatively low minimum fetch interval. See Throttling for more information.

Step 2: Set in-app default parameter values

You can set in-app default parameter values in the Remote Config object, so that your app behaves as intended before it connects to the Remote Config backend, and so that default values are available if none are set in the backend.

  1. Define a set of parameter names, and default parameter values using an NSDictionary object or a plist file .

    If you have already configured Remote Config backend parameter values, you can download a generated plist file that includes all default values and save it to your Xcode project.

    ОТДЫХ

    curl --compressed -D headers -H "Authorization: Bearer token -X GET https://firebaseremoteconfig.googleapis.com/v1/projects/my-project-id/remoteConfig:downloadDefaults?format=PLIST -o RemoteConfigDefaults.plist
    

    Firebase console

    1. In the Parameters tab, open the Menu , and select Download default values .

    2. When prompted, enable .plist for iOS , then click Download file .

  2. Add these values to the Remote Config object using setDefaults: . The following example sets in-app default values from a plist file:

    Быстрый

    remoteConfig.setDefaults(fromPlist: "RemoteConfigDefaults")

    Цель-C

    [self.remoteConfig setDefaultsFromPlistFileName:@"RemoteConfigDefaults"];

Step 3: Get parameter values to use in your app

Now you can get parameter values from the Remote Config object. If you later set values in the Remote Config backend, fetch them, and then activate them, those values are available to your app. Otherwise, you get the in-app parameter values configured using setDefaults: . To get these values, call the configValueForKey: method, providing the parameter key as an argument.

Step 4: Set parameter values

Using the Firebase console or the Remote Config backend APIs , you can create new backend default values that override the in-app values according to your desired conditional logic or user targeting. This section walks you through the Firebase console steps to create these values.

  1. In the Firebase console , open your project.
  2. Select Remote Config from the menu to view the Remote Config dashboard.
  3. Define parameters with the same names as the parameters that you defined in your app. For each parameter, you can set a default value (which will eventually override the in-app default value) and you can also set conditional values. To learn more, see Remote Config Parameters and Conditions .

Step 5: Fetch and activate values

To fetch parameter values from Remote Config , call the fetchWithCompletionHandler: or fetchWithExpirationDuration:completionHandler: method. Any values that you set on the backend are fetched and cached in the Remote Config object.

For cases where you want to fetch and activate values in one call, use fetchAndActivateWithCompletionHandler: .

This example fetches values from the Remote Config backend (not cached values) and calls activateWithCompletionHandler: to make them available to the app:

Быстрый

remoteConfig.fetch { (status, error) -> Void in
  if status == .success {
    print("Config fetched!")
    self.remoteConfig.activate { changed, error in
      // ...
    }
  } else {
    print("Config not fetched")
    print("Error: \(error?.localizedDescription ?? "No error available.")")
  }
  self.displayWelcome()
}

Цель-C

[self.remoteConfig fetchWithCompletionHandler:^(FIRRemoteConfigFetchStatus status, NSError *error) {
    if (status == FIRRemoteConfigFetchStatusSuccess) {
        NSLog(@"Config fetched!");
      [self.remoteConfig activateWithCompletion:^(BOOL changed, NSError * _Nullable error) {
        if (error != nil) {
          NSLog(@"Activate error: %@", error.localizedDescription);
        } else {
          dispatch_async(dispatch_get_main_queue(), ^{
            [self displayWelcome];
          });
        }
      }];
    } else {
        NSLog(@"Config not fetched");
        NSLog(@"Error %@", error.localizedDescription);
    }
}];

Because these updated parameter values affect the behavior and appearance of your app, you should activate the fetched values at a time that ensures a smooth experience for your user, such as the next time that the user opens your app. See Remote Config loading strategies for more information and examples.

Step 6: Listen for updates in real time

After you fetch parameter values, you can use real-time Remote Config to listen for updates from the Remote Config backend. Real-time Remote Config signals to connected devices when updates are available and automatically fetches the changes after you publish a new Remote Config version.

Real-time updates are supported by the Firebase SDK for Apple platforms v10.7.0+ and higher.

  1. In your app, call addOnConfigUpdateListener to start listening for updates and automatically fetch any new or updated parameter values. The following example listens for updates and when activateWithCompletionHandler is called, uses the newly fetched values to display an updated welcome message.

    Быстрый

    remoteConfig.addOnConfigUpdateListener { configUpdate, error in
      guard let configUpdate, error == nil else {
        print("Error listening for config updates: \(error)")
      }
    
      print("Updated keys: \(configUpdate.updatedKeys)")
    
      self.remoteConfig.activate { changed, error in
        guard error == nil else { return self.displayError(error) }
        DispatchQueue.main.async {
          self.displayWelcome()
        }
      }
    }

    Цель-C

    __weak __typeof__(self) weakSelf = self;
    [self.remoteConfig addOnConfigUpdateListener:^(FIRRemoteConfigUpdate * _Nonnull configUpdate, NSError * _Nullable error) {
      if (error != nil) {
        NSLog(@"Error listening for config updates %@", error.localizedDescription);
      } else {
        NSLog(@"Updated keys: %@", configUpdate.updatedKeys);
    
        __typeof__(self) strongSelf = weakSelf;
        [strongSelf.remoteConfig activateWithCompletion:^(BOOL changed, NSError * _Nullable error) {
          if (error != nil) {
            NSLog(@"Activate error %@", error.localizedDescription);
          }
    
          dispatch_async(dispatch_get_main_queue(), ^{
            [strongSelf displayWelcome];
          });
        }];
      }
    }];
  2. The next time you publish a new version of your Remote Config , devices that are running your app and listening for changes will call the completion handler.

Throttling

If an app fetches too many times in a short time period, fetch calls are throttled and the SDK returns FIRRemoteConfigFetchStatusThrottled . Before SDK version 6.3.0, the limit was 5 fetch requests in a 60 minute window (newer versions have more permissive limits).

During app development,you might want to fetch more often to refresh the cache very frequently (many times per hour) to let you rapidly iterate as you develop and test your app. Real-time Remote Config updates automatically bypass the cache when the config is updated on the server. To accommodate rapid iteration on a project with numerous developers, you can temporarily add a FIRRemoteConfigSettings property with a low minimum fetch interval ( MinimumFetchInterval ) in your app.

The default and recommended production fetch interval for Remote Config is 12 hours, which means that configs won't be fetched from the backend more than once in a 12 hour window, regardless of how many fetch calls are actually made. Specifically, the minimum fetch interval is determined in this following order:

  1. The parameter in fetch(long)
  2. The parameter in FIRRemoteConfigSettings.MinimumFetchInterval
  3. The default value of 12 hours

Следующие шаги

If you haven't already, explore the Remote Config use cases , and take a look at some of the key concepts and advanced strategies documentation, including: