Extends: ass: KSVPNUFacade
Declared in: KSVPNUFacade.h
- (void)connectToVPNAndUseOnDemand:(BOOL)useOnDemand completion:(void(^)(NSError *error))completion;
This method returns after VPN tunnel connection process is started and does not signals about the actual success of the VPN connection. In order to obtain the connection status, use the connectionStatus property.
connectionStatus
- (void)connectToVPNWithCompletion:(void(^)(NSError *error))completion;
- (void)enableOnDemand:(BOOL)enable completion:(void(^)(NSError *error))completion;
- (void)enableOnDemandForCellular:(BOOL)enable completion:(void (^)(NSError *error))completion;
Not available in Mac OS X. Available in iOS v8.0.
- (void)enableVPNWithCompletion:(void(^)(NSError *error))completion;
If succeeded, this method disables VPN configurations of other apps.
Available in Mac OS X v10.11. Available in iOS v8.0.
- (void)loadPreferencesWithCompletion:(void(^)(NSError *error))completion;
This method loads the preferences for VPN configuration of the current application. You can call this method if you want to retrieve connectionStatus property before any call to configurator.
- (void)removeProfileWithCompletion:(void(^)(NSError *error))completion;
- (void)setProtocol:(VPNUProtocol)protocol shouldReconnect:(BOOL)shouldReconnect serverItem:(VPNUServerItem *)serverItem completion:(void(^)(NSError *error))completion;
This method sets the protocol for VPN configuration. Disconnects VPN if it was connected. If reconnect flag is YES then VPN will be connected with new protocol to serverItem, otherwise serverItem will be ignored.
- (void)setupVPNWithServerItem:(VPNUServerItem *)serverItem completion:(void(^)(NSError *error, BOOL successfullyInstalled))completion;
This method first retrieves VPN profile information for the specified server item. If this step was succesful, it then tries to install a new VPN profile into the system using the information retrieved in the first step.
- (void)stopVPNAndUseOnDemand:(BOOL)useOnDemand completion:(void(^)(NSError *error))completion;
This method returns after VPN tunnel disconnect process is started and does not signals about the actual success of the VPN connection. In order to obtain the connection status, use the connectionStatus property.
connectionStatus
- (void)stopVPNWithCompletion:(void(^)(NSError *error))completion;