I am working on an app that will reduce the user screen time via blocking some social applications like Facebook, Instagram, youtube, etc.
with help of NEProxySettings.match domains() I am able to block youtube but seems like none of the domain names is working for Facebook and Instagram, for now, I have used the following domain names.
Do not use a packet tunnel provider to implement a network content filter. Packets that are read from NEPacketTunnelFlow are meant to be sent over a tunnel connection to a remote server for injection into a remote network. They are not meant to be dropped or re-injected back into the system. Doing so is a content filter action, as supported by one of the Network Extension Content Filter Providers APIs. On iOS, implement a connection-based content filter using NEFilterDataProvider and NEFilterControlProvider. On macOS, implement a connection-based content filter with NEFilterDataProvider or a packet-based content filter with NEFilterPacketProvider. On macOS, using both providers at the same time is supported.
There are two ways to deploy a content filter on iOS. In a managed environment, use MDM to deploy a content filter to supervised devices. In an unmanaged environment, deploy your content filter as part of a Screen Time app.
Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com