Hydra VPN SDK demo for iOS
This is a demo application for iOS with basic usage of Hydra VPN SDK.
Compatibility
iOS 9 or newer
SDK Quick Installation Guide
Download latest SDK:
Prepare Application
Create iOS application and additional Network Extension target, so you'll have:
Application target
Network Extension target
For both, the Application and the Network Extension targets, do the following:
Add following system frameworks to your project dependencies:
NetworkExtension
Security
libz.tbd
2. In your project: Project > Build Settings:
Set Enable Bitcode to "NO"
Set Other Linker Flags to
-ObjC
.
3. Enable Network Extension and Personal VPN entitlements for both application and network extension targets, create App Group that will be used on both targets.
Install Hydra SDK
Add HydraApplicationSDK.framework for Application target
Add HydraTunnelProviderSDK.framework for Network Extension target
Make your PacketTunnelProvider class from Network Extension target extend AFPacketTunnelProvider and remove stub class implementation.
In your AppDelegate or other shared Singleton object, initialize Hydra SDK:
Replace placeholders with your values obtained from developer portal and your XCode or Apple Developer Portal configuration.
After you're logged in, you're good to go start VPN:
Handle VPN state notifications:
If you have to choose VPN server country before connecting, you can call availableCountries
and then startVpn
with specific country.
For more detailed information refer to Hydra SDK documentation.
Last updated