How to collect statistics for Message Filter Extension and Call Blocking Extension?

Hi everyone,

I'm developing an iOS app that includes both a Message Filter Extension and a Call Blocking Extension.

I'd like to understand whether there is any supported way to collect or access statistics for these extensions, such as:

  • Number of messages filtered (allowed vs. junk)
  • Number of blocked calls
  • Number of identified calls
  • Extension invocation count
  • Filtering success/failure metrics
  • Any analytics or usage data exposed by the system

I understand that these extensions are privacy-sensitive, so I'm not expecting access to user content. I'm specifically looking for aggregate statistics or system-provided metrics that an app can legally and technically access.

My questions are:

  1. Does iOS expose any APIs or callbacks for collecting usage statistics from a Message Filter Extension?
  2. Is there any way to determine how many calls were blocked or identified by a Call Blocking Extension?
  3. Are there any recommended Apple-supported approaches for tracking extension usage without violating user privacy?
  4. If no APIs are available, is this limitation intentional due to the privacy model of these extensions?

I'd appreciate any guidance or best practices from Apple engineers or developers who have worked with these extensions.

Thank you!

Answered by DTS Engineer in 897997022
  1. Does iOS expose any APIs or callbacks for collecting usage statistics from a Message Filter Extension?
  2. Is there any way to determine how many calls were blocked or identified by a Call Blocking Extension?

No.

  1. Are there any recommended Apple-supported approaches for tracking extension usage without violating user privacy?

It's possible MetricKit might provide some amount of data about general extension runtime; however, I'm sure how useful that data would even be, given how little time either of these extension points should actually spend running.

  1. If no APIs are available, is this limitation intentional due to the privacy model of these extensions?

Yes, that's exactly why it works this way.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

  1. Does iOS expose any APIs or callbacks for collecting usage statistics from a Message Filter Extension?
  2. Is there any way to determine how many calls were blocked or identified by a Call Blocking Extension?

No.

  1. Are there any recommended Apple-supported approaches for tracking extension usage without violating user privacy?

It's possible MetricKit might provide some amount of data about general extension runtime; however, I'm sure how useful that data would even be, given how little time either of these extension points should actually spend running.

  1. If no APIs are available, is this limitation intentional due to the privacy model of these extensions?

Yes, that's exactly why it works this way.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

@DTS Engineer Thanks for the answer, will it be the same case for URL Filter Network Extension as well. As we also want to collect stats data for the URL Filter Network Extension about how many URLs are blocked by the filter.

How to collect statistics for Message Filter Extension and Call Blocking Extension?
 
 
Q