Framework

IdentityLookup

Create an app extension that can identify and filter unwanted SMS and MMS messages while preserving user privacy.

Overview

When an SMS or MMS message is received from an unknown sender, the Messages app can ask your message filter app extension to determine whether the message is unwanted. Your app extension can make this determination by using its own built-in data and logic or by deferring to analysis made by your associated server.

To find out if a message from an unknown sender is unwanted, the Messages app launches the currently enabled message filter app extension and queries it, as shown in Figure 1.

Figure 1

Passing a query to a message filter app extension to get the status of a message

A diagram that shows the communication flow from Messages to a message filter app extension

The Messages app uses an ILMessageFilterQueryRequest object to pass information about the message to your message filter app extension. If your app extension can determine whether the message is unwanted, it returns its decision back to Messages in an ILMessageFilterQueryResponse object.

If your app extension can't make this determination by itself, it tells Messages to send the information about the message to a server associated with your app. Your server examines the message information and sends a response to Messages, which passes the response to your app extension. The app extension parses the server's response and gives the final decision to Messages in an ILMessageFilterQueryResponse object, as shown in Figure 2.

Figure 2

Passing a query to an app's associated server to get the status of a message

A diagram that shows the communication flow from Messages to a message filter app extension and between Messages and the app's associated server

Topics

First Steps

Creating a Message Filter App Extension

Create an app extension that helps identify unwanted messages.

App Extension

class ILMessageFilterExtensionContext

The extension context for a message filter app extension.

class ILMessageFilterExtension

The abstract base class for the principal class of a message filter app extension.

Queries

class ILMessageFilterQueryRequest

A request for a message filter app extension to determine the status of a message received from an unknown sender.

protocol ILMessageFilterQueryHandling

A set of methods implemented by a message filter app extension to handle query requests.

Responses

class ILMessageFilterQueryResponse

A response to a message filter query request.

class ILNetworkResponse

A response to an HTTPS network request performed on behalf of a message filter app extension.

enum ILMessageFilterAction

An action to take in response to a received message.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software