The principal class for an app proxy provider app extension.
- iOS 9.0+
- macOS 10.11+
NEApp class provides access to flows of network data in the form of
NEApp objects. Each
NEApp object corresponds to a socket opened by an app that matches the app rules specified in the current App Proxy configuration. Your App Proxy Provider acts as a transparent network proxy for the flows of network data that it receives.
In addition to flows of raw network data from applications, the App Proxy Provider also receives flows of DNS queries in the form of
NEApp objects. DNS query flows are received only for applications that use low-level DNS resolution APIs such as
DNSService(). The App Proxy Provider can specify the DNS resolver configuration that will be used by these applications using the
Applications that use higher-level networking APIs such as
NSURLConnection do not generate DNS queries. Instead the destination hostname for the connection is included in the endpoint information of the
Creating an App Proxy Provider Extension
App Proxy Providers run as App Extensions for the
com extension point.
To create a App Proxy Provider extension, first create a new App Extension target in your project.
For an example of an Xcode build target for this app extension, see the SimpleTunnel: Customized Networking Using the NetworkExtension Framework sample code project.
Once you have a App Proxy Provider extension target, create a sub-class of
NEApp. Then, set the
NSExtension key in the the extension’s
Info to the name of your sub-class.
If it is not already done, set the
NSExtension key in the extension’s
Here is an example of the NSExtension dictionary in a App Proxy Provider extension’s
Finally, add your App Proxy Provider extension target to your app’s Embed App Extensions build phase.
In order to create a App Proxy Provider extension, you must create a subclass of
NEApp and override the methods listed below.