Classes Bridged to Swift Standard Library Value Types

Use bridged reference types when you need reference semantics or Foundation-specific behavior.

Topics

Strings

class NSString

A static plain-text Unicode string object, for use instead of a String constant in cases that require reference semantics.

class NSMutableString

A dynamic plain-text Unicode string object, for use instead of a String variable in cases that require reference semantics.

Arrays

class NSArray

An object representing a static ordered collection, for use instead of an Array constant in cases that require reference semantics.

class NSMutableArray

An object representing a dynamic ordered collection, for use instead of an Array variable in cases that require reference semantics.

Dictionaries

class NSDictionary

An object representing a static collection of key-value pairs, for use instead of a Dictionary constant in cases that require reference semantics.

class NSMutableDictionary

An object representing a dynamic collection of key-value pairs, for use instead of a Dictionary variable in cases that require reference semantics.

Sets

class NSSet

An object representing a static, unordered, uniquing collection, for use instead of a Set constant in cases that require reference semantics.

class NSMutableSet

An object representing a dynamic, unordered, uniquing collection, for use instead of a Set variable in cases that require reference semantics.

See Also

Swift Support

protocol ReferenceConvertible

A decoration applied to types that are backed by a Foundation reference type.