NEFilterManager > enabled property very worrying documentation

Code Block Obj-C
@property enabled
 * @discussion Toggles the enabled status of the filter. [...]
 *     On macOS, up to 4 filter configurations of the same grade can be enabled simultaneously.


Questions:
  • What is "up to 4 filters" supposed to mean in the real world?

  • Does it mean that as on iOS, if a 5th filter is enabled, then one of the existing 4 will be disabled?

  • How is the software supposed to be informed about being disabled without its knowledge/consent?

  • Why is there a limitation in the first place?

In regards to your questions:

What is "up to 4 filters" supposed to mean in the real world?

You can have up to 4 content filter configurations enabled at one time. Note that a single configuration can make use of both a NEFilterDataProvider and a NEFilterPacketProvider.

Does it mean that as on iOS, if a 5th filter is enabled, then one of the existing 4 will be disabled?

On iOS only one filter configuration can be enabled at a time.
On both platforms, attempting to enable a content filter configuration beyond the limit will fail.

How is the software supposed to be informed about being disabled without its knowledge/consent?

Observing NEFilterConfigurationDidChange would be one technique to be information on the status of the configuration.

Why is there a limitation in the first place?

To ensure performance on the system and to try and separate filtering conflicts as much as possible.


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
Thanks for the answers.

On both platforms, attempting to enable a content filter configuration beyond the limit will fail. 

Regarding iOS (even though I don't care at all about it), the documentation in the header file says that setting this property "will disable filter configurations of other apps". So this does match what you're writing.

To ensure performance on the system and to try and separate filtering conflicts as much as possible.

IMHO, this will create technical support nightmares for 3rd party developers.
NEFilterManager > enabled property very worrying documentation
 
 
Q