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

# addUserDecision(_:)

Adds a new user decision, and replaces an existing user decision if the times are identical.

## Declaration

```swift
final func addUserDecision(_ decision: CNDecision) -> Bool
```

## Parameters

- `decision`: The decision to add.

## Return Value

Return Value A flag indicating whether adding a user decision was successful.

## Discussion

Discussion note: Adding a decision can fail if the decision focuses on a detection or detection group that does not exist or if its time is not within the time range of the Cinematic script.
