AppSettingsWriter

public protocol AppSettingsWriter: AppSettingsReader

This protocol extends AppSettingsReader by adding the ability to store and remove values.

This framework also extends UserDefaults, allowing it to be used as an AppSettingsWriter.

  • Changes the value of the given setting to the specified object.

    Declaration

    Swift

    func set(value: Any, named name: String)

    Parameters

    value

    The new value for the setting.

    name

    The name of the setting whose value is to be changed.

  • set(bool:named:) Default implementation

    Changes the value of the given setting to the specified boolean.

    Default Implementation

    Changes the value of the given setting to the specified boolean.

    Declaration

    Swift

    func set(bool value: Bool, named name: String)

    Parameters

    value

    The new value for the setting.

    name

    The name of the setting whose value is to be changed.

  • set(int:named:) Default implementation

    Changes the value of the given setting to the specified integer.

    Default Implementation

    Changes the value of the given setting to the specified integer.

    Declaration

    Swift

    func set(int value: Int, named name: String)

    Parameters

    value

    The new value for the setting.

    name

    The name of the setting whose value is to be changed.

  • set(double:named:) Default implementation

    Changes the value of the given setting to the specified Double.

    Default Implementation

    Changes the value of the given setting to the specified Double.

    Declaration

    Swift

    func set(double value: Double, named name: String)

    Parameters

    value

    The new value for the setting.

    name

    The name of the setting whose value is to be changed.

  • set(string:named:) Default implementation

    Changes the value of the given setting to the specified string.

    Default Implementation

    Changes the value of the given setting to the specified string.

    Declaration

    Swift

    func set(string value: String, named name: String)

    Parameters

    value

    The new value for the setting.

    name

    The name of the setting whose value is to be changed.

  • set(array:named:) Default implementation

    Changes the value of the given setting to the specified array.

    Default Implementation

    Changes the value of the given setting to the specified array.

    Declaration

    Swift

    func set(array value: [Any], named name: String)

    Parameters

    value

    The new value for the setting.

    name

    The name of the setting whose value is to be changed.

  • set(dictionary:named:) Default implementation

    Changes the value of the given setting to the specified dictionary.

    Default Implementation

    Changes the value of the given setting to the specified dictionary.

    Declaration

    Swift

    func set(dictionary value: [String: Any], named name: String)

    Parameters

    value

    The new value for the setting.

    name

    The name of the setting whose value is to be changed.

  • Removes the existing value (if any) for the setting with the given name.

    Declaration

    Swift

    func removeValue(named name: String)

    Parameters

    name

    The name of the setting whose value is to be removed.