Instance Method

setMetadata:forPersistentStore:

Sets the metadata stored in the persistent store during the next save operation executed on it to metadata.

Declaration

- (void)setMetadata:(NSDictionary<NSString *,id> *)metadata forPersistentStore:(NSPersistentStore *)store;

Parameters

metadata

A dictionary containing metadata for the store.

store

A persistent store.

Discussion

The store type and UUID (NSStoreTypeKey and NSStoreUUIDKey) are always added automatically, however NSStoreUUIDKey is only added if it is not set manually as part of the dictionary argument.

See Also

Working with Metadata

+ metadataForPersistentStoreWithURL:error:

Returns a dictionary that contains the metadata stored in the persistent store at the specified location.

Deprecated
- metadataForPersistentStore:

Returns a dictionary that contains the metadata currently stored and that will be stored in a given persistent store.

Store Metadata

Use™ metadata dictionary keys to identify the store type and UUID.