NEPacketTunnelProvider Get Source app Name or app id in NEPacketTunnelProvider

I've implemented NEPacketTunnelProvider with ipv4Settings everything is fine. I just need app id in PacketTunnelProvider every time any request sent from any app. or request from my single app.

Note: I got the app id in DataFilterProvider, now I'm looking for NEPacketTunnelProvider.

Packet tunnel providers operate in one of two routing modes:

  • Destination IP, which is the default

  • Source app, which is a form of per-app VPN

Information about the source app is only available in the second mode.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Completed the setup of per app VPN using MDM & MDM has provided a profile to install on iPhone. when I opened the profile with a text editor it doesn't contain the VPNUUID & ProviderType. My Queries are: 1- From where I can get this VPNUUID & ProviderType? 2- what's steps should I follow after getting these? 3- what will be the updating in my NEPacketTunnelProvider?

From where I can get this VPNUUID & ProviderType?

That depends on your MDM system.

Under the covers the connection between a per-app VPN configuration and the apps it targets is done via the VPNUUID value:

  1. The MDM subsystem generates a UUID.

  2. It stores that UUID in the VPN configuration. Specifically, it goes into the VPNUUID property of the com.apple.vpn.managed.applayer payload.

  3. It then associates the app with that UUID. Specifically, it installs the app, setting the VPNUUID attribute as part of that installation.

Exactly how you set this up depends on your MDM system, and I can’t help you with that.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

NEPacketTunnelProvider Get Source app Name or app id in NEPacketTunnelProvider
 
 
Q