<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Cinematic",
  "identifier" : "/documentation/Cinematic/CNDetectionTrack-2bxtd",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Cinematic"
    ],
    "preciseIdentifier" : "s:9Cinematic16CNDetectionTrackC"
  },
  "title" : "CNDetectionTrack"
}
-->

# CNDetectionTrack

An object representing a series of detections of the same subject over time.

```
class CNDetectionTrack
```

## Topics

### Instance Properties

[`var detectionGroupID: CNDetectionGroupID`](/documentation/Cinematic/CNDetectionTrack-2bxtd/detectionGroupID)

The detection group ID of the subject detected by the track.

[`var detectionID: CNDetectionID`](/documentation/Cinematic/CNDetectionTrack-2bxtd/detectionID)

The unique ID of the subject detected during this track.

[`var detectionType: CNDetectionType`](/documentation/Cinematic/CNDetectionTrack-2bxtd/detectionType)

The type of object that’s detected.

[`var isDiscrete: Bool`](/documentation/Cinematic/CNDetectionTrack-2bxtd/isDiscrete)

A flag determining if the detection track has discrete detections, otherwise continuous.

[`var isUserCreated: Bool`](/documentation/Cinematic/CNDetectionTrack-2bxtd/isUserCreated)

A flag indicating if the client created the detection track.

### Instance Methods

[`func detection(atOrBefore: CMTime) -> CNDetection?`](/documentation/Cinematic/CNDetectionTrack-2bxtd/detection(atOrBefore:))

Returns the array of detections in the detection track before a given time.

[`func detection(nearest: CMTime) -> CNDetection?`](/documentation/Cinematic/CNDetectionTrack-2bxtd/detection(nearest:))

Returns the array of detections in the detection track nearest a given time.

[`func detections(in: CMTimeRange) -> [CNDetection]`](/documentation/Cinematic/CNDetectionTrack-2bxtd/detections(in:))

Returns the array of detections in the detection track within the given time range.

## Relationships

### Inherited By

[`CNFixedDetectionTrack-93rrw`](/documentation/Cinematic/CNFixedDetectionTrack-93rrw)

[`CNCustomDetectionTrack-9a2zo`](/documentation/Cinematic/CNCustomDetectionTrack-9a2zo)

---

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)