Type Method

load(contentsOf:withName:)

Blocks your app while loading an entity from a file URL.

Declaration

static func load(contentsOf url: URL, withName resourceName: String? = nil) throws -> Entity

Parameters

url

A file URL representing the file to load.

resourceName

A unique name to assign to the loaded resource, for use in network synchronization.

Return Value

The root entity in the loaded file.

See Also

Loading an Entity Hierarchy

static func load(named: String, in: Bundle?) -> Entity

Blocks your app while loading an entity from a file in a bundle.

static func loadAsync(named: String, in: Bundle?) -> LoadRequest<Entity>

Loads an entity from a file in a bundle asynchronously.