<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "swift: 5.9.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftData",
  "identifier" : "/documentation/SwiftData/ModelContainer/configurationName(forStoreIdentifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftData"
    ],
    "preciseIdentifier" : "s:9SwiftData14ModelContainerC17configurationName18forStoreIdentifierSSSgSS_tF"
  },
  "title" : "configurationName(forStoreIdentifier:)"
}
-->

# configurationName(forStoreIdentifier:)

Returns the configuration name associated with the given on-disk store identifier.

```
func configurationName(forStoreIdentifier identifier: String) -> String?
```

## Parameters

`identifier`

A store identifier string, for example from
`PersistentIdentifier.storeIdentifier` or a history transaction’s store identifier.

## Return Value

The `name` of the `ModelConfiguration` that backs the given store, or `nil` if
no store with that identifier exists in this container or if `invalidate()` has been called.

## Discussion

Use this when you already have a store identifier — such as `PersistentIdentifier.storeIdentifier`
from a fetched object or a store identifier from a history transaction — and need to map it
back to the human-readable configuration name that produced that 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)