@@ -32,7 +32,7 @@ extern NSString *const _Nonnull FIRRemoteConfigThrottledEndTimeInSecondsKey NS_S
32
32
33
33
/* *
34
34
* Listener registration returned by `addOnConfigUpdateListener`. Calling its method `remove` stops
35
- * the listener from receiving config updates and unregisters itself.
35
+ * the associated listener from receiving config updates and unregisters itself.
36
36
*
37
37
* If remove is called and no other listener registrations remain, the connection to the real-time
38
38
* RC backend is closed. Subsequently calling `addOnConfigUpdateListener` will re-open the
@@ -41,8 +41,8 @@ extern NSString *const _Nonnull FIRRemoteConfigThrottledEndTimeInSecondsKey NS_S
41
41
NS_SWIFT_NAME (ConfigUpdateListenerRegistration)
42
42
@interface FIRConfigUpdateListenerRegistration : NSObject
43
43
/* *
44
- * Removes the listener being tracked by this `ConfigUpdateListenerRegistration`. After the initial
45
- * call, subsequent calls have no effect.
44
+ * Removes the listener associated with this `ConfigUpdateListenerRegistration`. After the
45
+ * initial call, subsequent calls have no effect.
46
46
*/
47
47
- (void )remove;
48
48
@end
@@ -82,17 +82,17 @@ typedef NS_ERROR_ENUM(FIRRemoteConfigErrorDomain, FIRRemoteConfigError){
82
82
FIRRemoteConfigErrorInternalError = 8003 ,
83
83
} NS_SWIFT_NAME(RemoteConfigError);
84
84
85
- // / Remote Config error domain that handles errors for the real-time service.
85
+ // / Remote Config error domain that handles errors for the real-time config update service.
86
86
extern NSString *const _Nonnull FIRRemoteConfigUpdateErrorDomain NS_SWIFT_NAME (RemoteConfigUpdateErrorDomain);
87
- // / Firebase Remote Config real-time service error.
87
+ // / Firebase Remote Config real-time config update service error.
88
88
typedef NS_ERROR_ENUM (FIRRemoteConfigUpdateErrorDomain, FIRRemoteConfigUpdateError){
89
- // / Unable to make a connection to the backend.
89
+ // / Unable to make a connection to the Remote Config backend.
90
90
FIRRemoteConfigUpdateErrorStreamError = 8001 ,
91
- // / Unable to fetch the latest config.
91
+ // / Unable to fetch the latest version of the config.
92
92
FIRRemoteConfigUpdateErrorNotFetched = 8002 ,
93
93
// / The ConfigUpdate message was unparsable.
94
94
FIRRemoteConfigUpdateErrorMessageInvalid = 8003 ,
95
- // / The real-time Remote Config service is unavailable.
95
+ // / The Remote Config real-time config update service is unavailable.
96
96
FIRRemoteConfigUpdateErrorUnavailable = 8004 ,
97
97
} NS_SWIFT_NAME(RemoteConfigUpdateError);
98
98
@@ -171,7 +171,9 @@ NS_SWIFT_NAME(RemoteConfigSettings)
171
171
@end
172
172
173
173
#pragma mark - FIRRemoteConfigUpdate
174
- // / Firebase Remote Config update
174
+ // / Used by Remote Config real-time config update service, this class represents changes between the
175
+ // / newly fetched config and the current one. An instance of this class is passed to
176
+ // / `FIRRemoteConfigUpdateCompletion` when a new config version has been automatically fetched.
175
177
NS_SWIFT_NAME (RemoteConfigUpdate)
176
178
@interface FIRRemoteConfigUpdate : NSObject
177
179
@@ -325,12 +327,13 @@ NS_SWIFT_NAME(RemoteConfig)
325
327
// / nil if the key doesn't exist in the default config.
326
328
- (nullable FIRRemoteConfigValue *)defaultValueForKey:(nullable NSString *)key;
327
329
328
- #pragma mark - Realtime
330
+ #pragma mark - Real-time Config Updates
329
331
330
332
// / Completion handler invoked by `addOnConfigUpdateListener` when there is an update to
331
333
// / the config from the backend.
332
334
// /
333
- // / @param configUpdate Information on which key's values have changed
335
+ // / @param configUpdate An instance of `FIRRemoteConfigUpdate` that contains information on which
336
+ // / key's values have changed.
334
337
// / @param error Error message on failure.
335
338
typedef void (^FIRRemoteConfigUpdateCompletion)(FIRRemoteConfigUpdate *_Nullable configUpdate,
336
339
NSError *_Nullable error)
@@ -349,8 +352,7 @@ typedef void (^FIRRemoteConfigUpdateCompletion)(FIRRemoteConfigUpdate *_Nullable
349
352
// /
350
353
// / @param listener The configured listener that is called for every config update.
351
354
// / @return Returns a registration representing the listener. The registration contains
352
- // / a remove method, which can be used to stop receiving for updates for this particular
353
- // / registration.
355
+ // / a remove method, which can be used to stop receiving updates for the provided listener.
354
356
- (FIRConfigUpdateListenerRegistration *_Nonnull)addOnConfigUpdateListener:
355
357
(FIRRemoteConfigUpdateCompletion _Nonnull)listener
356
358
NS_SWIFT_NAME (addOnConfigUpdateListener(remoteConfigUpdateCompletion:));
0 commit comments