---
title: willEnterForeground
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/notificationcenter/messageidentifier/willenterforeground-p1og
---

# willEnterForeground

An identifier for a message about a host app preparing to run in the foreground.

## Declaration

```swift
static var willEnterForeground: NotificationCenter.BaseMessageIdentifier<NSExtensionContext.WillEnterForegroundMessage> { get }
```

## Discussion

Discussion Use this identifier with NotificationCenter’s addObserver(of:for:using:) or messages(of:for:bufferSize:) methods to observe messages of type NSExtensionContext.WillEnterForegroundMessage.

## See Also

### Identifying extension messages

- [didBecomeActive](foundation/notificationcenter/messageidentifier/didbecomeactive-79dvm.md)
- [willResignActive](foundation/notificationcenter/messageidentifier/willresignactive-9z4xc.md)
- [didEnterBackground](foundation/notificationcenter/messageidentifier/didenterbackground-5gdtk.md)
