Contents

SCPreferencesAddValue(_:_:_:)

Associates the specified value with the specified preference key.

Declaration

func SCPreferencesAddValue(_ prefs: SCPreferences, _ key: CFString, _ value: CFPropertyList) -> Bool

Parameters

  • prefs:

    The preferences session.

  • key:

    The preference key.

  • value:

    The value to associate with the preference key.

Return Value

true if the value was added; false if the key already exists or if an error occurred.

Discussion

To commit these changes to permanent storage, you must call SCPreferencesCommitChanges(_:).

See Also

Adding, Getting, and Removing Values