---
title: delegate
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiapplication/delegate
---

# delegate

The delegate of the app object.

## Declaration

```swift
unowned(unsafe) var delegate: (any UIApplicationDelegate)? { get set }
```

## Discussion

Discussion Every app must have an app delegate object to respond to app-related messages. For example, the app notifies its delegate when the app finishes launching and when its foreground or background execution status changes. Similarly, app-related messages coming from the system are often routed to the app delegate for handling. Xcode provides an initial app delegate for every app and you should not need to change this delegate later. The delegate must adopt the UIApplicationDelegate formal protocol.

## See Also

### Configuring your app’s behavior

- [UIApplicationDelegate](uikit/uiapplicationdelegate.md)
