devsite/tools/jazzy/templates

FirebaseRemoteConfig Framework Reference

RemoteConfigValue

class RemoteConfigValue : NSObject, NSCopying

This class provides a wrapper for Remote Config parameter values, with methods to get parameter values as different data types.

  • Gets the value as a string.

    Declaration

    Swift

    var stringValue: String { get }
  • Gets the value as a number value.

    Declaration

    Swift

    var numberValue: NSNumber { get }
  • Gets the value as a NSData object.

    Declaration

    Swift

    var dataValue: Data { get }
  • Gets the value as a boolean.

    Declaration

    Swift

    var boolValue: Bool { get }
  • Gets a foundation object (NSDictionary / NSArray) by parsing the value as JSON. This method uses NSJSONSerialization’s JSONObjectWithData method with an options value of 0.

    Declaration

    Swift

    var jsonValue: Any? { get }
  • Identifies the source of the fetched value.

    Declaration

    Swift

    var source: RemoteConfigSource { get }
  • Extracts a RemoteConfigValue JSON-encoded object and decodes it to the requested type.

    Declaration

    Swift

    func decoded<Value>(asType: Value.Type = Value.self) throws -> Value where Value : Decodable

    Parameters

    asType

    The type to decode the JSON-object to