I am creating an app the allows you to connect to a VPN at the tap of a button. I've been experimenting with the code, and I receive an error Use of unresolved identifier 'getPasscodeNSData'. I Googled everywhere but I could not find a way to solve this. Thank you in advance, I will leave the chunk of code below.
func initVPN() {
let manager: NEVPNManager = NEVPNManager.sharedManager()
let p = NEVPNProtocolIPSec()
p.username = "vpnUser"
p.passwordReference = getPasscodeNSData("vpnPassword")
p.serverAddress = "vpnIP"
p.authenticationMethod = NEVPNIKEAuthenticationMethod.SharedSecret
p.sharedSecretReference = getPasscodeNSData("vpnSharedSecret")
p.useExtendedAuthentication = true
p.disconnectOnSleep = false
}