Skip to content
This repository has been archived by the owner on Mar 19, 2022. It is now read-only.

When i called removeFromPreferences, get some error #221

Open
angryAnt7 opened this issue Sep 13, 2021 · 0 comments
Open

When i called removeFromPreferences, get some error #221

angryAnt7 opened this issue Sep 13, 2021 · 0 comments

Comments

@angryAnt7
Copy link

SecItemDelete failed: -25300

public func configRemove()
{
self.providerManager.removeFromPreferences{ error in
if let error = error {
print("##configRemove (error)")
} else {
print("##configRemove (error)")
}
}
}


VPN settings are cleared. I got error is nil.
but i got this log
SecItemDelete failed: -25300

I don`t use keychain
my ovpn file already contains the certificate.
here is my config code

let tunnelProtocol = NETunnelProviderProtocol()
tunnelProtocol.username = ""
tunnelProtocol.serverAddress = ""
tunnelProtocol.providerBundleIdentifier = BundleId // bundle id of the network extension target
tunnelProtocol.providerConfiguration = ["ovpn": data]
tunnelProtocol.disconnectOnSleep = false
self.providerManager.protocolConfiguration = tunnelProtocol
self.providerManager.localizedDescription = "****" // the title of the VPN profile which will appear on Settings
self.providerManager.isEnabled = true

There is no problem with the VPN-connection
what should I do?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant