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

When i called removeFromPreferences, get some error #221

@angryAnt7

Description

@angryAnt7

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions