Returns an atomic store, initialized with the given arguments.
- iOS 3.0+
- macOS 10.5+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Data
A persistent store coordinator.
The name of the managed object model configuration to use.
The URL of the store to load. This value must not be
A dictionary containing configuration options.
An atomic store, initialized with the given arguments, or
nil if the store could not be initialized.
You typically do not invoke this method yourself; it is invoked by the persistent store coordinator during
add, both when a new store is created and when an existing store is opened.
In your implementation, you should check whether a file already exists at
url; if it does not, then you should either create a file here or ensure that your
load: method does not fail if the file does not exist.
Any subclass of
NSAtomic must be able to handle being initialized with a URL pointing to a zero-length file. This serves as an indicator that a new store is to be constructed at the specified location and allows you to securely create reservation files in known locations which can then be passed to Core Data to construct stores. You may choose to create zero-length reservation files during
load:. If you do so, you must remove the reservation file if the store is removed from the coordinator before it is saved.
You should ensure that you load metadata during initialization and set it using
You must invoke
super’s implementation to ensure that the store is correctly initialized.