Open Classswift 6.0.3Foundation
UserDefaults
class UserDefaults
class UserDefaults
import Foundation
class NSObject
The root class of most Foundation class hierarchies.
protocol CustomDebugStringConvertible
A type with a customized textual representation suitable for debugging purposes.
protocol CustomStringConvertible
A type with a customized textual representation.
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol NSObjectProtocol : AnyObject
The NSObjectProtocol
groups methods that are fundamental to all Foundation objects.
override convenience init()
init?(suiteName suitename: String?)
nil suite means use the default search list that +standardUserDefaults uses
static let argumentDomain: String
static let didChangeNotification: NSNotification.Name
static let globalDomain: String
static let registrationDomain: String
class var standard: UserDefaults { get }
class func resetStandardUserDefaults()
var volatileDomainNames: [String] { get }
func addSuite(named suiteName: String)
func array(forKey defaultName: String) -> [Any]?
func bool(forKey defaultName: String) -> Bool
func data(forKey defaultName: String) -> Data?
func dictionary(forKey defaultName: String) -> [String : Any]?
func dictionaryRepresentation() -> [String : Any]
func double(forKey defaultName: String) -> Double
func float(forKey defaultName: String) -> Float
func integer(forKey defaultName: String) -> Int
func object(forKey defaultName: String) -> Any?
func objectIsForced(forKey key: String) -> Bool
func objectIsForced(forKey key: String, inDomain domain: String) -> Bool
func persistentDomain(forName domainName: String) -> [String : Any]?
func register(defaults registrationDictionary: [String : Any])
func removeObject(forKey defaultName: String)
func removePersistentDomain(forName domainName: String)
func removeSuite(named suiteName: String)
func removeVolatileDomain(forName domainName: String)
func set(_ url: URL?, forKey defaultName: String)
func set(_ value: Bool, forKey defaultName: String)
func set(_ value: Double, forKey defaultName: String)
func set(_ value: Float, forKey defaultName: String)
func set(_ value: Int, forKey defaultName: String)
func set(_ value: Any?, forKey defaultName: String)
func setPersistentDomain(_ domain: [String : Any], forName domainName: String)
func setVolatileDomain(_ domain: [String : Any], forName domainName: String)
func string(forKey defaultName: String) -> String?
func stringArray(forKey defaultName: String) -> [String]?
@discardableResult func synchronize() -> Bool
func url(forKey defaultName: String) -> URL?
func volatileDomain(forName domainName: String) -> [String : Any]