<!--
{
  "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/CNScript-1ispe/addUserDecision(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Cinematic"
    ],
    "preciseIdentifier" : "s:9Cinematic8CNScriptC15addUserDecisionySbAA10CNDecisionVF"
  },
  "title" : "addUserDecision(_:)"
}
-->

# addUserDecision(_:)

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

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

## Parameters

`decision`

The decision to add.

## Return Value

A flag indicating whether adding a user decision was successful.

## 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.

---

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)