<!--
{
  "availability" : [
    "iOS: 11.4.0 -",
    "iPadOS: 11.4.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ClassKit",
  "identifier" : "/documentation/ClassKit/CLSContext/addChildContext(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "ClassKit"
    ],
    "preciseIdentifier" : "c:objc(cs)CLSContext(im)addChildContext:"
  },
  "title" : "addChildContext(_:)"
}
-->

# addChildContext(_:)

Adds the specifed context as a child of the context receiving the method call.

```
func addChildContext(_ child: CLSContext)
```

## Parameters

`child`

The context to add as a child of the one receiving the method call.

## Discussion

You don’t need to call this method directly. Instead, use the [`CLSDataStoreDelegate`](/documentation/ClassKit/CLSDataStoreDelegate)
protocol to build contexts.

---

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)