<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreData",
  "identifier" : "/documentation/CoreData/NSManagedObjectModel/init(byMerging:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core Data"
    ],
    "preciseIdentifier" : "c:objc(cs)NSManagedObjectModel(cm)modelByMergingModels:"
  },
  "title" : "init(byMerging:)"
}
-->

# init(byMerging:)

Creates a single model from an array of existing models.

```
init?(byMerging models: [NSManagedObjectModel]?)
```

## Parameters

`models`

An array of instances of `NSManagedObjectModel`.

## Return Value

A single model made by combining the models in `models`.

## Discussion

You use this method to combine multiple models (typically from different frameworks) into one.

---

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)