Instance Method

displayMessage(_:completionHandler:)

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

Declaration

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

Parameters

message

The message you want to display to the user.

completionHandler

A block that is called by the system after you call this method. The details of the call can vary, as follows:

  • If the system cannot display the message, or if you call the displayMessage:completionHandler: method in an NEFilterDataProvider instance, then the system calls the completionHandler block immediately after you call the method, and sets the block’s success parameter value to 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 true.