---
title: "displayMessage(_:completionHandler:)"
framework: networkextension
role: symbol
role_heading: Instance Method
path: "networkextension/neprovider/displaymessage(_:completionhandler:)"
---

# displayMessage(_:completionHandler:)

Call this method from your NEProvider subclass if you want to display a message to the person using the app.

## Declaration

```swift
func displayMessage(_ message: String, completionHandler: @escaping @Sendable (Bool) -> Void)
```

```swift
func displayMessage(_ message: String) async -> Bool
```

## Parameters

- `message`: The message you want to display to the person using the app.
- `completionHandler`: A block that the system calls after you call this method. The details of the call can vary, as follows: If the system can’t display the message, or if you call the displayMessage:completionHandler: method in an doc://com.apple.networkextension/documentation/NetworkExtension/NEFilterDataProvider instance, then the system calls the completionHandler block immediately after you call the method, and sets the block’s success parameter value to doc://com.apple.documentation/documentation/Swift/false. If the system successfully displays the message to the user, then the system calls the completionHandler block when the user dismisses the message, and sets the success parameter value to doc://com.apple.documentation/documentation/Swift/true.
