In the context of a research project at my university, we want to anonymously collect and statistically analyse usage behavior of an iOS device in a managed device context (MDM, not FamilySharing).
Since we cannot access the ScreenTime
API in our non-FamilySharing context, we've built a prototype that uses the tandem of NEFilterDataProvider
and NEFilterControlProvider
to log the anonymous network traffic (timestamps and originating app's bundle id). We plan to use machine learning and pattern matching algorithms to deduce app usage from network traffic.
The prototype is working very well with one exception:
The network traffic of some applications (in particular WhatsApp) does not trigger NEFilterDataProvider
's methods (which in turn does not trigger NEFilterControlProvider
).
I recall WhatsApp using web sockets and the VoIP extension in order to be able to send incoming messages to user devices even when the app was terminated via the app switcher. Is this (questionable) pattern preventing NEFilterDataProvider
from receiving flows for decision? Is web socket traffic not supported by NEFilterDataProvider
?
I understand our 'network logging' use case might be not quite in line with the Firewall use case NEFilterDataProvider
and friends are usually promoted for.
However, I would expect the API to work regardless. Imagine trying to build a Firewall application that wants to block all chat applications from accessing the network, for example. That should certainly work.