@@ -236,6 +236,22 @@ NS_SWIFT_NAME(RemoteConfig)
236236- (void )ensureInitializedWithCompletionHandler:
237237 (void (^_Nonnull)(NSError *_Nullable initializationError))completionHandler;
238238#pragma mark - Fetch
239+
240+ #if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180000)
241+ // / Fetches Remote Config data with a callback. Call `activate()` to make fetched data
242+ // / available to your app.
243+ // /
244+ // / Note: This method uses a Firebase Installations token to identify the app instance, and once
245+ // / it's called, it periodically sends data to the Firebase backend. (see
246+ // / `Installations.authToken(completion:)`).
247+ // / To stop the periodic sync, call `Installations.delete(completion:)`
248+ // / and avoid calling this method again.
249+ // /
250+ // / @param completionHandler Fetch operation callback with status and error parameters.
251+ - (void )fetchWithCompletionHandler:
252+ (void (^_Nullable NS_SWIFT_SENDABLE)(FIRRemoteConfigFetchStatus status,
253+ NSError *_Nullable error))completionHandler;
254+ #else
239255// / Fetches Remote Config data with a callback. Call `activate()` to make fetched data
240256// / available to your app.
241257// /
@@ -248,7 +264,27 @@ NS_SWIFT_NAME(RemoteConfig)
248264// / @param completionHandler Fetch operation callback with status and error parameters.
249265- (void )fetchWithCompletionHandler:(void (^_Nullable)(FIRRemoteConfigFetchStatus status,
250266 NSError *_Nullable error))completionHandler;
267+ #endif
251268
269+ #if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180000)
270+ // / Fetches Remote Config data and sets a duration that specifies how long config data lasts.
271+ // / Call `activateWithCompletion:` to make fetched data available to your app.
272+ // /
273+ // / Note: This method uses a Firebase Installations token to identify the app instance, and once
274+ // / it's called, it periodically sends data to the Firebase backend. (see
275+ // / `Installations.authToken(completion:)`).
276+ // / To stop the periodic sync, call `Installations.delete(completion:)`
277+ // / and avoid calling this method again.
278+ // /
279+ // / @param expirationDuration Override the (default or optionally set `minimumFetchInterval`
280+ // / property in RemoteConfigSettings) `minimumFetchInterval` for only the current request, in
281+ // / seconds. Setting a value of 0 seconds will force a fetch to the backend.
282+ // / @param completionHandler Fetch operation callback with status and error parameters.
283+ - (void )fetchWithExpirationDuration:(NSTimeInterval )expirationDuration
284+ completionHandler:(void (^_Nullable NS_SWIFT_SENDABLE)(
285+ FIRRemoteConfigFetchStatus status,
286+ NSError *_Nullable error))completionHandler;
287+ #else
252288// / Fetches Remote Config data and sets a duration that specifies how long config data lasts.
253289// / Call `activateWithCompletion:` to make fetched data available to your app.
254290// /
@@ -265,7 +301,23 @@ NS_SWIFT_NAME(RemoteConfig)
265301- (void )fetchWithExpirationDuration:(NSTimeInterval )expirationDuration
266302 completionHandler:(void (^_Nullable)(FIRRemoteConfigFetchStatus status,
267303 NSError *_Nullable error))completionHandler;
304+ #endif
268305
306+ #if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180000)
307+ // / Fetches Remote Config data and if successful, activates fetched data. Optional completion
308+ // / handler callback is invoked after the attempted activation of data, if the fetch call succeeded.
309+ // /
310+ // / Note: This method uses a Firebase Installations token to identify the app instance, and once
311+ // / it's called, it periodically sends data to the Firebase backend. (see
312+ // / `Installations.authToken(completion:)`).
313+ // / To stop the periodic sync, call `Installations.delete(completion:)`
314+ // / and avoid calling this method again.
315+ // /
316+ // / @param completionHandler Fetch operation callback with status and error parameters.
317+ - (void )fetchAndActivateWithCompletionHandler:
318+ (void (^_Nullable NS_SWIFT_SENDABLE)(FIRRemoteConfigFetchAndActivateStatus status,
319+ NSError *_Nullable error))completionHandler;
320+ #else
269321// / Fetches Remote Config data and if successful, activates fetched data. Optional completion
270322// / handler callback is invoked after the attempted activation of data, if the fetch call succeeded.
271323// /
@@ -279,14 +331,23 @@ NS_SWIFT_NAME(RemoteConfig)
279331- (void )fetchAndActivateWithCompletionHandler:
280332 (void (^_Nullable)(FIRRemoteConfigFetchAndActivateStatus status,
281333 NSError *_Nullable error))completionHandler;
334+ #endif
282335
283336#pragma mark - Apply
284337
338+ #if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180000)
339+ // / Applies Fetched Config data to the Active Config, causing updates to the behavior and appearance
340+ // / of the app to take effect (depending on how config data is used in the app).
341+ // / @param completion Activate operation callback with changed and error parameters.
342+ - (void )activateWithCompletion:
343+ (void (^_Nullable NS_SWIFT_SENDABLE)(BOOL changed, NSError *_Nullable error))completion;
344+ #else
285345// / Applies Fetched Config data to the Active Config, causing updates to the behavior and appearance
286346// / of the app to take effect (depending on how config data is used in the app).
287347// / @param completion Activate operation callback with changed and error parameters.
288348- (void )activateWithCompletion:(void (^_Nullable)(BOOL changed,
289349 NSError *_Nullable error))completion;
350+ #endif
290351
291352#pragma mark - Get Config
292353// / Enables access to configuration values by using object subscripting syntax.
0 commit comments