<!--
{
  "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/NSPersistentContainer/name",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Data"
    ],
    "preciseIdentifier" : "c:objc(cs)NSPersistentContainer(py)name"
  },
  "title" : "name"
}
-->

# name

The container’s name.

```
var name: String { get }
```

## Discussion

This property is passed in as part of the initialization of the persistent container. This name is used to locate the [`NSManagedObjectModel`](/documentation/CoreData/NSManagedObjectModel) (if the [`NSManagedObjectModel`](/documentation/CoreData/NSManagedObjectModel) object is not passed in as part of the initialization) and is used to name the persistent store.

---

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)