<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/NSPersistentStoreDescription",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Data"
    ],
    "preciseIdentifier" : "c:objc(cs)NSPersistentStoreDescription"
  },
  "title" : "NSPersistentStoreDescription"
}
-->

# NSPersistentStoreDescription

A description object used to create and load a persistent store.

```
class NSPersistentStoreDescription
```

## Topics

### Creating a Persistent Store Description

[`init(url:)`](/documentation/CoreData/NSPersistentStoreDescription/init(url:)-ko0l)

Initializes the receiver with a URL for the store.

[`persistentStoreDescriptionWithURL:`](/documentation/CoreData/NSPersistentStoreDescription/persistentStoreDescriptionWithURL:)

Initializes and returns a persistent store description with the given URL.

### Configuring a Persistent Store Description

[`url`](/documentation/CoreData/NSPersistentStoreDescription/url)

The URL that the store will use for its location.

[`configuration`](/documentation/CoreData/NSPersistentStoreDescription/configuration)

The name of the configuration used by this store.

[`timeout`](/documentation/CoreData/NSPersistentStoreDescription/timeout)

The connection timeout for the associated store.

[`type`](/documentation/CoreData/NSPersistentStoreDescription/type)

The type of store this description represents.

[`isReadOnly`](/documentation/CoreData/NSPersistentStoreDescription/isReadOnly)

A flag that indicates whether this store will be read-only.

[`shouldAddStoreAsynchronously`](/documentation/CoreData/NSPersistentStoreDescription/shouldAddStoreAsynchronously)

A flag that determines whether the store is added asynchronously.

[`shouldInferMappingModelAutomatically`](/documentation/CoreData/NSPersistentStoreDescription/shouldInferMappingModelAutomatically)

A flag indicating whether a mapping model should be created automatically.

[`shouldMigrateStoreAutomatically`](/documentation/CoreData/NSPersistentStoreDescription/shouldMigrateStoreAutomatically)

A flag indicating whether the associated persistent store should be migrated automatically.

[`setOption(_:forKey:)`](/documentation/CoreData/NSPersistentStoreDescription/setOption(_:forKey:))

Sets an option on the store.

[`setValue(_:forPragmaNamed:)`](/documentation/CoreData/NSPersistentStoreDescription/setValue(_:forPragmaNamed:))

Allows you to set pragmas for the SQLite store.

### Accessing the Configuration Options

[`options`](/documentation/CoreData/NSPersistentStoreDescription/options)

A dictionary representation of the options set on the associated persistent store.

[`sqlitePragmas`](/documentation/CoreData/NSPersistentStoreDescription/sqlitePragmas)

The SQLite pragmas set for the associated persistent store. (read-only)

### Syncing to CloudKit

[`cloudKitContainerOptions`](/documentation/CoreData/NSPersistentStoreDescription/cloudKitContainerOptions)

Options that customize how this store description aligns with a CloudKit database.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)