---
title: "mergedModel(from:forStoreMetadata:)"
framework: coredata
role: symbol
role_heading: Type Method
path: "coredata/nsmanagedobjectmodel/mergedmodel(from:forstoremetadata:)"
---

# mergedModel(from:forStoreMetadata:)

Returns a merged model from a specified array for the version information in provided metadata.

## Declaration

```swift
class func mergedModel(from bundles: [Bundle]?, forStoreMetadata metadata: [String : Any]) -> NSManagedObjectModel?
```

## Parameters

- `bundles`: An array of bundles.
- `metadata`: A dictionary containing version information from the metadata for a persistent store.

## Return Value

Return Value The managed object model used to create the store for the metadata. If a model cannot be created to match the version information specified by metadata, returns nil.

## Discussion

Discussion This method is a companion to mergedModel(from:).

## See Also

### Creating a managed object model

- [init(contentsOf:)](coredata/nsmanagedobjectmodel/init(contentsof:).md)
- [init()](coredata/nsmanagedobjectmodel/init().md)
- [mergedModel(from:)](coredata/nsmanagedobjectmodel/mergedmodel(from:).md)
- [init(byMerging:)](coredata/nsmanagedobjectmodel/init(bymerging:).md)
- [init(byMerging:forStoreMetadata:)](coredata/nsmanagedobjectmodel/init(bymerging:forstoremetadata:).md)
