Post

Replies

Boosts

Views

Activity

Apple tv VPN appp.
Hello there, I already have a native iOS vpn app that I developed and is already on the appstore working well, I decided to support tvOS, where I downloaded apple tvOS beta 17 on real device, downloaded latest xcode beta and setup my code, when connecting to vpn it fails alwas (Ikev2), my only question is may the error be from my code (where it works well on iOS) or apple does not support the vpn connection in beta till now ?
5
0
1.6k
Sep ’23
NEPacketTunnelProvider
Hello, I am developing a vpn app using several protocols, one of them is Wireguard. When the app is terminated, there is a tunnel that vpn is still communicating with which is a subclass of NEPacketTunnelProvider. In some cases when stopping the tunnel using wireguardAdapter.stop(withcompletionHandler:) func it may throws an error of stopping the tunnel, in this case I want to force stop the tunnel, but when on-demand is on it will try to reconnect and the user will remains without internet connection on his wifi until he turns off the on-demand by his hand. I tried to call the NEVPNMnager and load preference and then turn on-demand of then stop the tunnel and it did not works. here is my code. ` let manager = NEVPNManager.shared() manager.loadFromPreferences { error in if let error = error { self.wgLogger.log("Error loading from preferences: \(error, privacy: .public)") return } manager.isOnDemandEnabled = false manager.saveToPreferences { error in if let error = error { self.wgLogger.log("Error saving to preferences: \(error, privacy: .public)") return } manager.connection.stopVPNTunnel() self.wgLogger.log("VPN tunnel stopped successfully.") } }
13
0
888
Jun ’23