Protocol

CLSDataStoreDelegate

An interface the data store uses to request new contexts.

Declaration

@protocol CLSDataStoreDelegate

Overview

When you request a context from the data store, for example using a call to the descendantMatchingIdentifierPath:completion: method, the data store first tries to locate an existing context matching the search criterion (an identifier path in this case) in its database. Depending on certain conditions, the context might already exist in the database from the last time you requested it. If it does, the data store returns the stored context. But if it doesn’t exist, the data store asks its delegate to build a new context.

Adopt the data store delegate protocol to provide contexts on demand.

You can alternatively build contexts directly without relying on the delegate callback. However, it’s generally most efficient to use the delegate protocol, building contexts only when they’re missing from the data store.

Topics

Creating Contexts

- createContextForIdentifier:parentContext:parentIdentifierPath:

Asks the delegate for a new context with the given identifier for the given parent context.

Required.

Relationships

Inherits From

See Also

Managing the Delegate

Building Missing Contexts

Create and initialize missing contexts.

delegate

The data store delegate instance.