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

# mergedModel(from:)

Returns a model created by merging all the models found in given bundles.

## Declaration

```swift
class func mergedModel(from bundles: [Bundle]?) -> NSManagedObjectModel?
```

## Parameters

- `bundles`: An array of instances of NSBundle to search. If you specify nil, then the main bundle is searched.

## Return Value

Return Value A model created by merging all the models found in bundles.

## See Also

### Creating a managed object model

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