<!--
{
  "availability" : [
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CompositorServices",
  "identifier" : "/documentation/CompositorServices/LayerRenderer/Drawable/addTrackingArea(identifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Compositor Services",
      "CompositorServices"
    ],
    "preciseIdentifier" : "c:@F@cp_drawable_add_tracking_area"
  },
  "title" : "addTrackingArea(identifier:)"
}
-->

# addTrackingArea(identifier:)

Returns a tracking area which is create on the drawable’s list of tracking areas.

```
func addTrackingArea(identifier: LayerRenderer.Drawable.TrackingArea.Identifier) -> LayerRenderer.Drawable.TrackingArea
```

## Parameters

`identifier`

The unique identifier for the tracking area.

## Return Value

A tracking area that was created.

## Discussion

A tracking area describes a region of a view that interacts
with the gaze/cursor.
Cannot use [`cp_tracking_area_identifier_invalid`](/documentation/CompositorServices/cp_tracking_area_identifier_invalid) as
an identifier.

---

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)