One Logo Pool Ball
Foundation · IOS API REFERENCE

UserDefaults

class · SDK 27.1

class UserDefaults

Members (44)

get

argumentDomain

TypeScript
static get argumentDomain(): string
Swift declaration
class let argumentDomain: String
get

globalDomain

TypeScript
static get globalDomain(): string
Swift declaration
class let globalDomain: String
get

registrationDomain

TypeScript
static get registrationDomain(): string
Swift declaration
class let registrationDomain: String
get · iOS 9.3+ · Deprecated in iOS 9.3

completedInitialCloudSyncNotification

TypeScript
static get completedInitialCloudSyncNotification(): NSNotification_Name
Swift declaration
class let completedInitialCloudSyncNotification: NSNotification.Name
get · iOS 9.3+ · Deprecated in iOS 9.3

didChangeCloudAccountsNotification

TypeScript
static get didChangeCloudAccountsNotification(): NSNotification_Name
Swift declaration
class let didChangeCloudAccountsNotification: NSNotification.Name
get · iOS 9.3+ · Deprecated in iOS 9.3

noCloudAccountNotification

TypeScript
static get noCloudAccountNotification(): NSNotification_Name
Swift declaration
class let noCloudAccountNotification: NSNotification.Name
get

didChangeNotification

TypeScript
static get didChangeNotification(): NSNotification_Name
Swift declaration
class let didChangeNotification: NSNotification.Name
get · iOS 9.3+

sizeLimitExceededNotification

TypeScript
static get sizeLimitExceededNotification(): NSNotification_Name
Swift declaration
class let sizeLimitExceededNotification: NSNotification.Name
static

resetStandardUserDefaults

TypeScript
static resetStandardUserDefaults(): void
Swift declaration
class func resetStandardUserDefaults()
get

standard

TypeScript
static get standard(): UserDefaults
Swift declaration
class var standard: UserDefaults { get }
method · iOS 4.0+

url

TypeScript
url(defaultName: string): (string) | null
Swift declaration
func url(forKey defaultName: String) -> URL?
method

addSuite

TypeScript
addSuite(suiteName: string): void
Swift declaration
func addSuite(named suiteName: String)
method

array

TypeScript
array(defaultName: string): (Array<unknown>) | null
Swift declaration
func array(forKey defaultName: String) -> [Any]?
method

bool

TypeScript
bool(defaultName: string): boolean
Swift declaration
func bool(forKey defaultName: String) -> Bool
method

data

TypeScript
data(defaultName: string): (ArrayBuffer) | null
Swift declaration
func data(forKey defaultName: String) -> Data?
method

dictionary

TypeScript
dictionary(defaultName: string): (Record<string, unknown>) | null
Swift declaration
func dictionary(forKey defaultName: String) -> [String : Any]?
method

dictionaryRepresentation

TypeScript
dictionaryRepresentation(): Record<string, unknown>
Swift declaration
func dictionaryRepresentation() -> [String : Any]
method

double

TypeScript
double(defaultName: string): number
Swift declaration
func double(forKey defaultName: String) -> Double
method

float

TypeScript
float(defaultName: string): number
Swift declaration
func float(forKey defaultName: String) -> Float
init

init

TypeScript
static init(): UserDefaults
Swift declaration
convenience init()
init · iOS 7.0+

init

TypeScript
static initSuiteName(suitename?: (string) | null): (UserDefaults) | null
Swift declaration
init?(suiteName suitename: String?)
method

integer

TypeScript
integer(defaultName: string): number
Swift declaration
func integer(forKey defaultName: String) -> Int
method

object

TypeScript
object(defaultName: string): (unknown) | null
Swift declaration
func object(forKey defaultName: String) -> Any?
method

objectIsForced

TypeScript
objectIsForcedForKey(key: string): boolean
Swift declaration
func objectIsForced(forKey key: String) -> Bool
method

objectIsForced

TypeScript
objectIsForcedForKeyInDomain(key: string, domain: string): boolean
Swift declaration
func objectIsForced(forKey key: String, inDomain domain: String) -> Bool
method

persistentDomain

TypeScript
persistentDomain(domainName: string): (Record<string, unknown>) | null
Swift declaration
func persistentDomain(forName domainName: String) -> [String : Any]?
method

register

TypeScript
register(registrationDictionary: Record<string, unknown>): void
Swift declaration
func register(defaults registrationDictionary: [String : Any])
method

removeObject

TypeScript
removeObject(defaultName: string): void
Swift declaration
func removeObject(forKey defaultName: String)
method

removePersistentDomain

TypeScript
removePersistentDomain(domainName: string): void
Swift declaration
func removePersistentDomain(forName domainName: String)
method

removeSuite

TypeScript
removeSuite(suiteName: string): void
Swift declaration
func removeSuite(named suiteName: String)
method

removeVolatileDomain

TypeScript
removeVolatileDomain(domainName: string): void
Swift declaration
func removeVolatileDomain(forName domainName: String)
method

set

TypeScript
setForKey(value: boolean, defaultName: string): void
Swift declaration
func set(_ value: Bool, forKey defaultName: String)
method

set

TypeScript
setForKey25523(value: number, defaultName: string): void
Swift declaration
func set(_ value: Double, forKey defaultName: String)
method

set

TypeScript
setForKey78712(value: number, defaultName: string): void
Swift declaration
func set(_ value: Float, forKey defaultName: String)
method

set

TypeScript
setForKey27968(value: number, defaultName: string): void
Swift declaration
func set(_ value: Int, forKey defaultName: String)
method

set

TypeScript
setForKey83917(value: (unknown) | null, defaultName: string): void
Swift declaration
func set(_ value: Any?, forKey defaultName: String)
method

setPersistentDomain

TypeScript
setPersistentDomain(domain: Record<string, unknown>, domainName: string): void
Swift declaration
func setPersistentDomain(_ domain: [String : Any], forName domainName: String)
method · iOS 4.0+

set

TypeScript
setForKey84895(url: (string) | null, defaultName: string): void
Swift declaration
func set(_ url: URL?, forKey defaultName: String)
method

setVolatileDomain

TypeScript
setVolatileDomain(domain: Record<string, unknown>, domainName: string): void
Swift declaration
func setVolatileDomain(_ domain: [String : Any], forName domainName: String)
method

stringArray

TypeScript
stringArray(defaultName: string): (Array<string>) | null
Swift declaration
func stringArray(forKey defaultName: String) -> [String]?
method

string

TypeScript
string(defaultName: string): (string) | null
Swift declaration
func string(forKey defaultName: String) -> String?
method

synchronize

TypeScript
synchronize(): boolean
Swift declaration
func synchronize() -> Bool
method

volatileDomain

TypeScript
volatileDomain(domainName: string): Record<string, unknown>
Swift declaration
func volatileDomain(forName domainName: String) -> [String : Any]
get

volatileDomainNames

TypeScript
get volatileDomainNames(): Array<string>
Swift declaration
var volatileDomainNames: [String] { get }

Skipped declarations

No declarations were skipped in this snapshot.

All Foundation types →