I use https://github.com/hwdsl2/setup-ipsec-vpn as vpn server.
and I create app connect my server use NEVPNManager
here is vpn configuration Code:
func createNewConfiguration() {
let p = NEVPNProtocolIKEv2()
p.serverAddress = "xxxxx"
p.remoteIdentifier = "x"xxxx
p.localIdentifier = "vpnclient"
p.authenticationMethod = .certificate
p.identityData = try! Data(contentsOf: Bundle.main.url(forResource: "vpnclient", withExtension: "p12")!)
p.identityDataPassword = "password"
p.useExtendedAuthentication = false
p.disconnectOnSleep = false
manager.isEnabled = true
manager.protocolConfiguration = p
manager.saveToPreferences { (error) in
guard error == nil else {
self.manager.protocolConfiguration = nil
return
}
self.connectAfterInit = true
}
}
I have tow file
ikev2vpnca.cer
vpnclient.p12
Here is my connection process
I import ikev2vpnca.cer as iOS profiles manual
then start app connect vpn
everything work fine.
But when I delete ikev2vpnca.cer at Setting-General-Profile
I can't connect to my VPN anymore
Can I implement step 1 use swift code? I don't want to send ikev2vpnca.cer to my iPhone and manual install it
There is no idea how to solve this problem
Post
Replies
Boosts
Views
Activity
My app donate shortcut , shortcut type is NSUserActivity, everything work fine in iOS
My app also have watch app, the Watch APP has been installed on my watch.
When I run this shortcut on apple watch, I am prompted that the App is not installed
I am 100% sure the Watch has this app installed
How to solve this problem?