What do keyboards, message filtering, call directory, content blockers and web extensions, ReplayKit and network extensions each do, and what constrains them?

19.3.2 · L3 · Interview

Predict first

A team plans a packet-tunnel VPN feature. What should they do before writing code?

// A: nothing, any app can add a VPN extension
// B: request the Network Extension entitlement from Apple with a justification and plan for strict review
// C: use a Share extension instead
  • A
  • B
  • C

Mental model. Each system extension point is a standard fitting in the building: a socket for keyboards, a filter on the post, a name-badge board for callers. You can only plug in what fits the socket, and the building keeps the dangerous ones (the network pipes) locked behind a licence.

Beyond sharing, iOS has extension points that plug your code into system features. Each has a narrow job, a privacy boundary and often an entitlement. Custom keyboard (UIInputViewController): replaces the system keyboard; it is sandboxed away from the network and the shared container unless the user grants Full Access (RequestsOpenAccess), never sees secure text fields (passwords, which always use the system keyboard) and has a very tight memory budget and no access to the microphone by default; keep it light and show a way to switch keyboards. Message Filter (ILMessageFilterExtension): classifies unknown-sender SMS as junk or promotion or transaction, either offline from the content or by a network lookup to your server, and the privacy rule is that the system sends only the sender and text of unknown senders, with no reply path. Call Directory (CXCallDirectoryProvider): supplies phone numbers to block or identify; you add numbers in ascending order in bulk (not per call) from a list the app prepared in the shared container, and the system reloads it; there is no real-time lookup of an incoming call. Unwanted Communication reporting offers a way to report junk. Safari Content Blocker: you give Safari a JSON rule list ([{"trigger": {...}, "action": {...}}]) and Safari applies it without ever sending browsing data to the extension, which is why it is considered private; Safari Web Extensions reuse WebExtensions (JavaScript, manifest) with a native handler and need user permission per site. Broadcast Upload and Broadcast Setup (ReplayKit): receive the screen frames and audio of a live broadcast in a separate process with a 50 MB budget, so you must stream the buffers to a server without keeping them.

Network extensions (NetworkExtension) are the most powerful and the most restricted: a packet tunnel provider (a VPN), an app proxy, a DNS proxy or DNS settings, a content filter (filtering traffic in a managed device), and transparent proxy. They need a specific entitlement and capability that Apple grants on request, run in their own long-lived process with a memory limit and sit in the network path, so they are subject to strict review, user permission (the VPN configuration prompt) and heavy testing. AuthenticationServices extensions (credential providers for passwords and passkeys, and the single sign-on extension for enterprise) integrate with AutoFill and managed devices. Choose the right point by the system feature you extend, not by convenience, and remember the shared rules: cold start, small memory, no UI of your own beyond what the point allows, shared data through app groups and the Keychain, and review criteria that vary by point (keyboards and network extensions get the closest scrutiny). Treat entitlement-gated points as a project, not a task: request the entitlement early with a clear justification, since the answer can take days and may be a refusal.

Network extensions need an entitlement Apple grants on request, and they are reviewed closely, so request it first.

What it extendsNotable constraint
Custom keyboardtext input system-wideno network or shared container without Full Access; never sees secure fields
Message Filterjunk classification for unknown sendersonly sender and text of unknown senders, no replies
Call Directorycaller ID and blockingnumbers loaded in ascending order in bulk, no per-call lookup
Content Blocker / Web ExtensionSafarirule list applied privately; web extensions need per-site permission
Broadcast Upload (ReplayKit)screen and audio streamingvery small memory budget, stream buffers out immediately
Network ExtensionVPN, proxy, DNS, filterApple-granted entitlement, strict review and user permission

Common traps

  • Building a keyboard that needs network access without handling Full Access being off. Without it the keyboard is sandboxed away from the network; degrade gracefully.
  • Planning a VPN or filter without requesting the NetworkExtension entitlement first. Apple must grant it; a refusal can block the project.

They might follow up with

  • Why can a Content Blocker be private? Safari applies the JSON rules itself and never tells the extension what the user browses.
  • How must Call Directory numbers be loaded? In ascending order, in bulk, from data the app prepared in the shared container.

Related questions

  • 19.3.1 How do Share and Action extensions work, and how do they receive and return data?
  • 19.1.1 What is an app extension, how is it launched, and what limits do extensions run under?
  • 17.5.1 How do passkeys, Sign in with Apple and ASWebAuthenticationSession work in AuthenticationServices?

← How do Share and Action extensions work, and how do they receive and…