---
title: "addDetectionTrack(_:)"
framework: cinematic
role: symbol
role_heading: Instance Method
path: "cinematic/cnscript-1ispe/adddetectiontrack(_:)"
---

# addDetectionTrack(_:)

Adds a user-created detection track.

## Declaration

```swift
final func addDetectionTrack(_ detectionTrack: CNDetectionTrack) -> CNDetectionID
```

## Parameters

- `detectionTrack`: The detection track to add.

## Return Value

Return Value The unique detection ID assigned to the added track, which can be used for later lookup or decision creation.
