LuxChat  2.0
Instant messenger for iOS
Instance Methods | Class Methods | Properties | List of all members
FIRRemoteConfig Class Reference
Inheritance diagram for FIRRemoteConfig:

Instance Methods

((unavailable("Use +remoteConfig instead.") - __attribute__
 Unavailable. Use +RemoteConfig instead.
 
(void) - fetchWithCompletionHandler:
 
(void) - fetchWithExpirationDuration:completionHandler:
 
(BOOL) - activateFetched
 
(nonnull FIRRemoteConfigValue *) - objectForKeyedSubscript:
 
(nonnull FIRRemoteConfigValue *) - configValueForKey:
 
(nonnull FIRRemoteConfigValue *) - configValueForKey:namespace:
 
(nonnull FIRRemoteConfigValue *) - configValueForKey:namespace:source:
 
(nonnull NSArray *) - allKeysFromSource:namespace:
 
(void) - setDefaults:
 
(void) - setDefaults:namespace:
 
(void) - setDefaultsFromPlistFileName:
 
(void) - setDefaultsFromPlistFileName:namespace:
 
(nullable FIRRemoteConfigValue *) - defaultValueForKey:namespace:
 Returns the default value of a given key. Returns nil if the key doesn't exist in DefaultConfig.
 

Class Methods

(remoteConfig() + NS_SWIFT_NAME
 

Properties

NSDate * lastFetchTime
 Last long fetch completion time.
 
FIRRemoteConfigFetchStatus lastFetchStatus
 Last fetch status. The status can be any enumerated value from FIRRemoteConfigFetchStatus.
 
FIRRemoteConfigSettingsconfigSettings
 Config settings are custom settings.
 

Method Documentation

- (BOOL) activateFetched

Applies fetched Config data to Active Config, causing updates to the behavior and appearance of the app to take effect (depending on how config data is used in the app). Returns true if FetchedConfig has been applied to RemoteConfig or if there is no FetchedConfig. Returns false if FetchedConfig is newer than RemoteConfig.

- (nonnull NSArray *) allKeysFromSource: (FIRRemoteConfigSource)  source
namespace: (nullable NSString *)  aNamespace 

Gets all the parameter keys from a given source and a given namespace.

Parameters
sourceThe config data source.
aNamespaceThe config data namespace.
Returns
An array of keys under the given source and namespace.
- (nonnull FIRRemoteConfigValue *) configValueForKey: (nullable NSString *)  key

Gets the config value of the default namespace.

Parameters
keyConfig key.
- (nonnull FIRRemoteConfigValue *) configValueForKey: (nullable NSString *)  key
namespace: (nullable NSString *)  aNamespace 

Gets the config value of a given namespace.

Parameters
keyConfig key.
aNamespaceConfig results under a given namespace.
- (nonnull FIRRemoteConfigValue *) configValueForKey: (nullable NSString *)  key
namespace: (nullable NSString *)  aNamespace
source: (FIRRemoteConfigSource)  source 

Gets the config value of a given namespace and a given source.

Parameters
keyConfig key.
aNamespaceConfig results under a given namespace.
sourceConfig value source.
- (void) fetchWithCompletionHandler: (nullable FIRRemoteConfigFetchCompletion)  completionHandler

Fetches Remote Config data with a callback.

Parameters
completionHandlerFetch operation callback.
- (void) fetchWithExpirationDuration: (NSTimeInterval)  expirationDuration
completionHandler: (nullable FIRRemoteConfigFetchCompletion)  completionHandler 

Fetches Remote Config data and sets a duration that specifies how long config data lasts.

Parameters
expirationDurationDuration that defines how long fetched config data is available, in seconds. When the config data expires, a new fetch is required.
completionHandlerFetch operation callback.
+ (remoteConfig() NS_SWIFT_NAME

Returns the FIRRemoteConfig instance shared throughout your app. This singleton object contains the complete set of Remote Config parameter values available to the app, including the Active Config and Default Config. This object also caches values fetched from the Remote Config Server until they are copied to the Active Config by calling activateFetched. When you fetch values from the Remote Config Server using the default Firebase namespace service, you should use this class method to create a shared instance of the FIRRemoteConfig object to ensure that your app will function properly with the Remote Config Server and the Firebase service.

- (nonnull FIRRemoteConfigValue *) objectForKeyedSubscript: (nonnull NSString *)  key

Enables access to configuration values by using object subscripting syntax. This is used to get the config value of the default namespace.

// Example:
FIRRemoteConfig *config = [FIRRemoteConfig remoteConfig];
FIRRemoteConfigValue *value = config["yourKey"];
BOOL b = value.boolValue;
NSNumber *number = config["yourKey"].numberValue;
- (void) setDefaults: (nullable NSDictionary< NSString *, NSObject * > *)  defaults

Sets config defaults for parameter keys and values in the default namespace config.

Parameters
defaultConfigA dictionary mapping a NSString * key to a NSObject * value.
- (void) setDefaults: (nullable NSDictionary< NSString *, NSObject * > *)  defaultConfig
namespace: (nullable NSString *)  aNamespace 

Sets config defaults for parameter keys and values in the default namespace config.

Parameters
defaultConfigA dictionary mapping a NSString * key to a NSObject * value.
aNamespaceConfig under a given namespace.
- (void) setDefaultsFromPlistFileName: (nullable NSString *)  fileName

Sets default configs from plist for default namespace;

Parameters
fileNameThe plist file name, with no file name extension. For example, if the plist file is defaultSamples.plist, call: [[FIRRemoteConfig remoteConfig] setDefaultsFromPlistFileName:"defaultSamples"];
- (void) setDefaultsFromPlistFileName: (nullable NSString *)  fileName
namespace: (nullable NSString *)  aNamespace 

Sets default configs from plist for a given namespace;

Parameters
fileNameThe plist file name, with no file name extension. For example, if the plist file is defaultSamples.plist, call: [[FIRRemoteConfig remoteConfig] setDefaultsFromPlistFileName:"defaultSamples"];
aNamespaceThe namespace where the default config is set.

The documentation for this class was generated from the following file: