Type Method

loadAsync(named:in:)

Loads an entity from a file in a bundle asynchronously.

Declaration

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

Parameters

name

The base name of the file to load, omitting the file extension.

bundle

The bundle containing the file. Use nil to search the app’s main bundle.

Return Value

A resource loader that publishes 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 load(contentsOf: URL, withName: String?) -> Entity

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