<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFTreeAppendChild(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFTreeAppendChild"
  },
  "title" : "CFTreeAppendChild(_:_:)"
}
-->

# CFTreeAppendChild(_:_:)

Adds a new child to a tree as the last in its list of children.

```
func CFTreeAppendChild(_ tree: CFTree!, _ newChild: CFTree!)
```

## Parameters

`tree`

The tree to which to add `newChild`.

`newChild`

The child tree to add to `tree`. If this parameter is a tree which is already a child of any other tree, the behavior is undefined.

## Discussion

When a child tree is added to another tree, the child tree is retained by its new parent.

---

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)