<!--
{
  "documentType" : "article",
  "framework" : "IdentityLookup",
  "identifier" : "/documentation/IdentityLookup/creating-a-message-filter-app-extension",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Creating a Message Filter App Extension"
}
-->

# Creating a Message Filter App Extension

Create an app extension that helps identify unwanted messages.

## Discussion

To create a Message Filter app extension, add a target that uses the Message Filter Extension template to the Xcode project for your containing app. The principal view controller in your app extension is a subclass of [`ILMessageFilterExtension`](/documentation/IdentityLookup/ILMessageFilterExtension) that adopts the [`ILMessageFilterQueryHandling`](/documentation/IdentityLookup/ILMessageFilterQueryHandling) protocol.

If you have servers that can help your app extension determine how to handle a message, you must add the Associated Domains capability to your Xcode project and specify those domains. Then, you must set up shared credentials as described in <doc://com.apple.documentation/documentation/Security/shared-web-credentials>, substituting `messagefilter` for `webcredentials` throughout the steps. Lastly, you must specify the domains in your `Info.plist` file, which should look similar to the dictionary shown below.

```xml
<key>NSExtension</key>
    <dict>
        <key>NSExtensionPrincipalClass</key>
            <string>MessageFilterExtension</string>
        <key>NSExtensionAttributes</key>
            <dict>
                <key>ILMessageFilterExtensionNetworkURL</key>
                <string>https://www.example-sms-filter-application.com/api</string>
            </dict>
        <key>NSExtensionPointIdentifier</key>
        <string>com.apple.identitylookup.message-filter</string>
     </dict>
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)