I have a corporate VPN profile installed. How do I turn on the VPN when I open a app?

I have a vpn profile installed and the use case is to turn on the VPN automatically when I open an app.

Replies

It’s hard to answer this without more context but let’s start with the simplest option…

The most common solution to this problem is to configure VPN On Demand. When your app opens a connection at service within on your intranet, VPN On Demand will kick in and start the VPN.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hi @vineethcode did you found solution for this. I'm looking for similar thing. I have corporate VPN, want to trigger VPN while opening my app. I didn't found any solution yet...can you please help me. I'm looking solution for native iOS using Swift4

Hi @eskimo I'm looking for some sample demo code, where I can trigger VPN connection while opening app. I've corporate VPN, deployed app on MDM, on supervised device. I've enabled VPN On-Demand, but still when I open my app, VPN doesn't trigger or open. For this please help me to resolve this issue.


I think I've to trigger VPN via programmatically using Swift4. Can you please share or help me with some sample code for this.