An interface the data store uses to request new contexts.


@protocol CLSDataStoreDelegate


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.


Creating Contexts

- createContextForIdentifier:parentContext:parentIdentifierPath:

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



Inherits From

See Also

Managing the Delegate

Building Missing Contexts

Create and initialize missing contexts.


The data store delegate instance.