Obtaining a list of installed VPN profiles programmatically - iOS

Is it possible for an application to program a list of VPN profiles installed on an iOS device?

I assume that this should not be possible, as this information is outside the application sandbox. However, I saw a NetworkExtension structure with the NEVPNConnection and NEVPNManager classes that allow you to start a VPN on the fly. If you can set up a VPN on the fly, it may also be possible to get existing VPN profiles.

In addition, NEVPNManager has the following method, which seems to load some settings: (void)loadFromPreferencesWithCompletionHandler:(void (^)(NSError *error))completionHandler NS_AVAILABLE(10_10, 8_0);

So, it would be great if you could tell me if it is possible to get a list of installed VPN profiles.

+6
source share

Source: https://habr.com/ru/post/989124/


All Articles