---
title: needsSave
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/nsuseractivity/needssave
---

# needsSave

A Boolean value that indicates whether the state of the activity needs to be updated.

## Declaration

```swift
var needsSave: Bool { get set }
```

## Discussion

Discussion If true, the delegate for this user activity receives a userActivityWillSave(_:) callback before the activity is sent for continuation on another device.

## See Also

### Registering and invalidating activities

- [becomeCurrent()](foundation/nsuseractivity/becomecurrent().md)
- [resignCurrent()](foundation/nsuseractivity/resigncurrent().md)
- [invalidate()](foundation/nsuseractivity/invalidate().md)
- [deleteAllSavedUserActivities(completionHandler:)](foundation/nsuseractivity/deleteallsaveduseractivities(completionhandler:).md)
- [deleteSavedUserActivities(withPersistentIdentifiers:completionHandler:)](foundation/nsuseractivity/deletesaveduseractivities(withpersistentidentifiers:completionhandler:).md)
