yahya
yahya

Reputation: 321

NEVPNManager connect to VPN only inside in application

I create application vpn with this toturial.but my problem is user can go to setting iPhone and connect to vpn.but I want user ONLY go to my application and connect to VPN.

My question is what should I in code NEVPNManageruntil the user can't turn on my VPN in setting iPhone and Only connecting to my VPN when user go to my application

Upvotes: 1

Views: 644

Answers (1)

Witterquick
Witterquick

Reputation: 6140

It's probably not possible by the API, but if you want a dirty solution, you can add a prefix to the username / password, so when the user tries to connect to your VPN via the Settings app, he would get username/password error. And when the user would press connect at your app, you will discard the prefix so he would be able to connect.

Upvotes: 0

Related Questions