---
title: willTerminateNotification
framework: appkit
role: symbol
role_heading: Type Property
path: appkit/nsapplication/willterminatenotification
---

# willTerminateNotification

Sends a notification to terminate the app.

## Declaration

```swift
class let willTerminateNotification: NSNotification.Name
```

## Discussion

Discussion The system posts this notification on the main actor in response to the terminate(_:) method, and only posted if the delegate method applicationShouldTerminate(_:) returns true. The notification object is shared. This notification doesn’t contain a userInfo dictionary. note: This notification isn’t sent during sudden termination of an app. For more information about sudden termination, see the section  ProcessInfo of ProcessInfo. To observe this notification using Swift concurrency, use NSApplication.WillTerminateMessage.

## See Also

### Notifications

- [didBecomeActiveNotification](appkit/nsapplication/didbecomeactivenotification.md)
- [didChangeScreenParametersNotification](appkit/nsapplication/didchangescreenparametersnotification.md)
- [didFinishLaunchingNotification](appkit/nsapplication/didfinishlaunchingnotification.md)
- [didHideNotification](appkit/nsapplication/didhidenotification.md)
- [didResignActiveNotification](appkit/nsapplication/didresignactivenotification.md)
- [didUnhideNotification](appkit/nsapplication/didunhidenotification.md)
- [didUpdateNotification](appkit/nsapplication/didupdatenotification.md)
- [willBecomeActiveNotification](appkit/nsapplication/willbecomeactivenotification.md)
- [willFinishLaunchingNotification](appkit/nsapplication/willfinishlaunchingnotification.md)
- [willHideNotification](appkit/nsapplication/willhidenotification.md)
- [willResignActiveNotification](appkit/nsapplication/willresignactivenotification.md)
- [willUnhideNotification](appkit/nsapplication/willunhidenotification.md)
- [willUpdateNotification](appkit/nsapplication/willupdatenotification.md)
- [didFinishRestoringWindowsNotification](appkit/nsapplication/didfinishrestoringwindowsnotification.md)
- [didChangeOcclusionStateNotification](appkit/nsapplication/didchangeocclusionstatenotification.md)
