Reputation: 206
I am trying to connect to VPN on my Mac OS using Swift. I have setup the code, and it tries to save the VPN-data to the OS. But when running the code i get this in my console:
2020-11-16 12:26:56.306167+0100 VPN.test[53978:1477837] Metal API Validation Enabled
2020-11-16 12:26:56.436101+0100 VPN.test[53978:1477890] [] Failed to save configuration Test VPN: Error Domain=NEConfigurationErrorDomain Code=10 "permission denied" UserInfo={NSLocalizedDescription=permission denied}
2020-11-16 12:26:56.437294+0100 VPN.test[53978:1477837] [] Failed to save configuration: Error Domain=NEVPNErrorDomain Code=5 "permission denied" UserInfo={NSLocalizedDescription=permission denied}
Could not save VPN Configurations
The source code is here: https://codeshare.io/G7NWdn
I am fairly new to xCode / swift, so maybe there is something I miss. Have tried to look up solutions on the internet, but nothing seems to work.
Hope some can help me!
Upvotes: 1
Views: 904