@@ -231,10 +231,18 @@ NS_SWIFT_NAME(RemoteConfig)
231
231
// / Unavailable. Use +remoteConfig instead.
232
232
- (nonnull instancetype )init __attribute__ ((unavailable(" Use +remoteConfig instead." )));
233
233
234
+ #if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180000)
235
+ // / Ensures initialization is complete and clients can begin querying for Remote Config values.
236
+ // / @param completionHandler Initialization complete callback with error parameter.
237
+ - (void )ensureInitializedWithCompletionHandler:
238
+ (void (^_Nonnull NS_SWIFT_SENDABLE)(NSError *_Nullable initializationError))completionHandler;
239
+ #else
234
240
// / Ensures initialization is complete and clients can begin querying for Remote Config values.
235
241
// / @param completionHandler Initialization complete callback with error parameter.
236
242
- (void )ensureInitializedWithCompletionHandler:
237
243
(void (^_Nonnull)(NSError *_Nullable initializationError))completionHandler;
244
+ #endif
245
+
238
246
#pragma mark - Fetch
239
247
240
248
#if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180000)
@@ -414,6 +422,25 @@ typedef void (^FIRRemoteConfigUpdateCompletion)(FIRRemoteConfigUpdate *_Nullable
414
422
NSError *_Nullable error)
415
423
NS_SWIFT_UNAVAILABLE(" Use Swift's closure syntax instead." );
416
424
425
+ #if (defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 180000)
426
+ // / Start listening for real-time config updates from the Remote Config backend and automatically
427
+ // / fetch updates when they're available.
428
+ // /
429
+ // / If a connection to the Remote Config backend is not already open, calling this method will
430
+ // / open it. Multiple listeners can be added by calling this method again, but subsequent calls
431
+ // / re-use the same connection to the backend.
432
+ // /
433
+ // / Note: Real-time Remote Config requires the Firebase Remote Config Realtime API. See Get started
434
+ // / with Firebase Remote Config at https://firebase.google.com/docs/remote-config/get-started for
435
+ // / more information.
436
+ // /
437
+ // / @param listener The configured listener that is called for every config update.
438
+ // / @return Returns a registration representing the listener. The registration contains
439
+ // / a remove method, which can be used to stop receiving updates for the provided listener.
440
+ - (FIRConfigUpdateListenerRegistration *_Nonnull)addOnConfigUpdateListener:
441
+ (FIRRemoteConfigUpdateCompletion _Nonnull NS_SWIFT_SENDABLE)listener
442
+ NS_SWIFT_NAME (addOnConfigUpdateListener(remoteConfigUpdateCompletion:));
443
+ #else
417
444
// / Start listening for real-time config updates from the Remote Config backend and automatically
418
445
// / fetch updates when they're available.
419
446
// /
@@ -431,6 +458,7 @@ typedef void (^FIRRemoteConfigUpdateCompletion)(FIRRemoteConfigUpdate *_Nullable
431
458
- (FIRConfigUpdateListenerRegistration *_Nonnull)addOnConfigUpdateListener:
432
459
(FIRRemoteConfigUpdateCompletion _Nonnull)listener
433
460
NS_SWIFT_NAME (addOnConfigUpdateListener(remoteConfigUpdateCompletion:));
461
+ #endif
434
462
435
463
- (void )setCustomSignals:(nonnull NSDictionary <NSString *, NSObject *> *)customSignals
436
464
withCompletion:(void (^_Nullable)(NSError *_Nullable error))completionHandler
0 commit comments