One Logo Pool Ball
Foundation · IOS API REFERENCE

UUID

struct · iOS 6.0+ · SDK 27.1

struct UUID

A universally unique value to identify types, interfaces, and other items.

Members (8)

init · iOS 6.0+

init

TypeScript
static initUuidString(string: string): (string) | null
Swift declaration
init?(uuidString string: String)

Creates a UUID from a string representation. Returns `nil` if the string isn't a valid UUID representation. - Parameter string: The string representation of a UUID, such as `E621E1F8-C36C-495A-93FC-0C247A3E6E5F`.

get · iOS 6.0+

uuidString

TypeScript
get uuidString(): string
Swift declaration
var uuidString: String { get }

Returns a string created from the UUID, such as "E621E1F8-C36C-495A-93FC-0C247A3E6E5F".

get · iOS 6.0+

description

TypeScript
get description(): string
Swift declaration
var description: String { get }

A textual representation of this instance. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(describing:)` initializer. This initializer works with any type, and uses the custom `description` property for types that conform to `CustomStringConvertible`: struct Point: CustomStringConvertible { let x: Int, y: Int var description: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(describing: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `description` property.

get · iOS 6.0+

customMirror

TypeScript
get customMirror(): SDKHandle
Swift declaration
var customMirror: Mirror { get }

The custom mirror for this instance. If this type has value semantics, the mirror should be unaffected by subsequent mutations of the instance.

get · iOS 6.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

init · iOS 6.0+

init

TypeScript
static initUuid(uuid: [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number]): string
Swift declaration
init(uuid: uuid_t)

Creates a UUID from the uuid C-language structure. - Parameter uuid: The C-language structure of a UUID.

get · iOS 6.0+

uuid

TypeScript
get uuid(): [number, number, number, number, number, number, number, number, number, number, number, number, number, number, number, number]
Swift declaration
var uuid: (UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8) { get }

Returns the UUID as bytes.

init · iOS 6.0+

init

TypeScript
static init(): string
Swift declaration
init()

Creates a UUID with RFC 4122 version 4 random bytes.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

UUID.random(using:)

This parameter hides a concrete Swift type.

All Foundation types →