Settings – How to turn on VPN from iOS app? (private APIs ok)
👨💻
Two ideas:
1) You can create a configuration profile with VPN on demand. This requires client authentication though. I believe that if some application tries to access domains or hosts specified in the VPN on demand in silent mode, the VPN will turn on.
to update: At one point Apple was sued for VPN on demand, so I believe they dropped this feature and after bringing it back it was tweaked again. Good to read this article for iOS 7: http://support.apple.com/kb/ts4550
2) The idea I gave for this question (iOS6 switching WiFi on a non-jailbroken device). Here’s a copy of the text from there:
I think it makes sense to have a look at SystemConfiguration.framework.
It contains a set of APIs for working with different communication interfaces, which are defined here: http://developer.apple.com/library/mac/#documentation/Networking/Reference/SCNetworkConfiguration/Reference/reference.html
This one is a private API.
to update: I think there have been some changes to SystemConfiguration and Apple has tightened security around this framework.
3) Apple may give some apps additional entitlements, so that they can build functionality that no other app can. For example, VPN client companies (such as Cisco) have been given special entitlements to build what are called in iOS “VPN plug-ins,” which is essentially a VPN client.
[ad_1]
Don’t forget to share this post with friends !