Configuration
public struct Configuration
A Realm.Configuration is used to describe the different options used to
create a Realm instance.
-
Declaration
Swift
public init(path: String? = RLMRealmConfiguration.defaultRealmPath(), inMemoryIdentifier: String? = nil, encryptionKey: NSData? = nil, readOnly: Bool = false, schemaVersion: UInt64 = 0, migrationBlock: MigrationBlock? = nil, objectTypes: [Object.Type]? = nil)Parameters
pathThe path to the realm file.
inMemoryIdentifierA string used to identify a particular in-memory Realm.
encryptionKey64-byte key to use to encrypt the data.
readOnlyWhether the Realm is read-only (must be true for read-only files).
schemaVersionThe current schema version.
migrationBlockThe block which migrates the Realm to the current version.
objectTypesThe subset of
Objectsubclasses persisted in the Realm.Return Value
An initialized
Realm.Configuration.
-
The path to the realm file. Mutually exclusive with
inMemoryIdentifier.Declaration
Swift
public var path: String? -
A string used to identify a particular in-memory Realm. Mutually exclusive with
path.Declaration
Swift
public var inMemoryIdentifier: String? -
64-byte key to use to encrypt the data.
Declaration
Swift
public var encryptionKey: NSData? = nil -
Whether the Realm is read-only (must be true for read-only files).
Declaration
Swift
public var readOnly: Bool = false -
The current schema version.
Declaration
Swift
public var schemaVersion: UInt64 = 0 -
The block which migrates the Realm to the current version.
Declaration
Swift
public var migrationBlock: MigrationBlock? = nil -
The classes persisted in the Realm.
Declaration
Swift
public var objectTypes: [Object.Type]?
View on GitHub
Install in Dash
Configuration Struct Reference