It seems adding something to NSSystemExtensionUsageDescription in the info.plist has fixed it
Post
Replies
Boosts
Views
Activity
I noticed whenever I hit connect the toggle UI element in the VPN profile of system preferences moves a little indicating the profile at least matches.
In the console app I do not see any crash reports, but filtering on my PacketTunnelDesktop target, I see:
"Found 0 registrations for com.example.desktop.PacketTunnel (com.apple.networkextension.packet-tunnel)"
I'm guessing some identifier is not matching? Unfortunately googling "Found 0 registrations for" yields 0 results on Google :(
The app bundle has the system extension packaged at Conents/Library/SystemExtensions/com.example.desktop.PacketTunnel .systemextension
Thanks for the explanation, I have recreated the Packet Tunnel Provider as a system extension.
However I'm having trouble getting the system extension started. After hitting tunnel.connection.startVPNTunnel() on the main app, nothing really happens and no error is caught.
Trying to attach the debugger as root also does not initiate, as it seems the extension is not started at all.
I have followed your advice detailed at: https://developer.apple.com/forums/thread/725805
The app is now copied to /Applications upon build
In the VPNManager, the providerBundleIdentifier is set to the bundleIdentifier of the system extension network extension.
I've added os_log to the main.swift initiation point, but no log shows up in the console app filtered by the subsystem
Any ideas where else to check?
Thanks for the response. Actually the only thing I was missing is the matchDomains property and now the DNS is hitting the local DNS forwarder.
This is indeed for implementing a VPN tunnel, not filtering content. The DNS requirements are so that the queries are resolved and saved temporarily into a list in which then the VPN tunnel can perform conditional routing based on said IPs.
I know it is working in development on device but is it against App Store guidelines to host a local listening DNS forwarder in the Network Extension?