Instance Method

createContextForIdentifier:parentContext:parentIdentifierPath:

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

Required.

Declaration

- (__kindof CLSContext *)createContextForIdentifier:(NSString *)identifier parentContext:(__kindof CLSContext *)parentContext parentIdentifierPath:(NSArray<NSString *> *)parentIdentifierPath;

Parameters

identifier

The identifier of the new context.

parentContext

The parent of the new context.

parentContextPath

The identifier path of the parent context.

Return Value

The new context.

Discussion

The framework automatically adds the returned context as a child of the parent context and saves the changes. You only need to create, initialize, and return the new context.