Pango Platform
HomeConsole
  • What is Pango Developer Platform
  • Getting started
    • Sign up on the Management Console
    • Create a new project
    • Switch projects
    • Change console settings
    • Edit your profile
    • Try out the demo app
    • Keep exploring
    • Deprecation and Sunset
  • Console details
    • Dashboard
      • General
      • Location loading
    • Users
      • User page
    • Active sessions
    • Network
      • Countries
      • Locations
      • Pools
        • Optimal location
        • Location rules
    • Settings
      • General
        • Project config description (JSON format)
          • Server selector (JSON format)
          • Request selector (JSON format)
      • Authentication methods
        • Auth Plugin requirements
      • VPN
        • General
        • VPN Bypass list
        • Client Networks
      • Member
    • Export Data
    • Log
  • SDK
    • Unified VPN SDK for Android
      • Setup
        • Application Setup
        • Proguard Rules, Notification, and Analytics Configurations
        • Backend URL Configuration
      • Usage
        • Initialization
        • VPN Interface
        • Backend interface
      • Features
        • Hydra Protocol
          • Location profile (Hydra only)
        • Custom sdk dependencies
        • Deferred VPN Service Initialization
        • Authentication
        • Client Network List (CNL)
        • OpenVPN transport
        • Wireguard Transport
        • Reconnection strategy
        • Single Protocol SDK
        • Killswitch
        • Domain route via VPN
        • Process route via VPN
        • Process Bypass
        • Domain Bypass
        • Traffic rules
        • VPN Node DNS Configuration
        • Multihop
          • Optimal Location
      • Exceptions
      • Version migration
      • Changelog
    • Unified VPN SDK for Apple
      • Setup
        • Application Setup
        • Network Extension Setup
          • Network Extension Setup for tvOS
        • Backend URL Configuration
      • Usage
        • Single Protocol SDK
        • Unified SDK
        • Logging
        • Decoding Encoded VPN SDK Logs
      • Features
        • Deferred VPN Service Initialization
        • Authentication
        • Wireguard Transport
        • Reconnection strategy
        • Killswitch
        • Domain Bypass
        • Multihop
          • Optimal Location
        • Client Network List (CNL)
        • Domain route via VPN
      • Changelog
      • API Reference
    • IPSEC VPN SDK for Apple
    • Unified VPN SDK for Windows
      • Setup
        • Backend URL Configuration
        • Service command line arguments
        • ARM Platform Support
      • Usage
        • CoreAPI
        • Events
        • Generating a Unique Device Identifier
        • Error processing
        • Pipe Messaging
      • Features
        • Traffic protection
          • Killswitch
          • Prevent IP Leaks
          • Block Local Networks
        • Other
          • Firewall
            • DNS Monitor
            • Process Bypass
            • Domain Bypass
            • Process route via VPN
            • Domain route via VPN
          • Throttling
          • Optimal Location
          • Common issues
        • Hydra Protocol
          • CustomDNS, UserDNS, MultiHop, VpnProfiles
        • OpenVPN Protocol
        • Wireguard Protocol
        • IPSec Protocol
      • Collecting Debug Logs
      • Changelog
    • Unified VPN SDK for Routers
      • SDK. Shared library.
      • Configuration Interface (CI)
        • Unix Domain Sockets CI
        • REST API CI
    • Unified VPN SDK Feature Comparison By Platform
    • Unified VPN SDK
      • Features
        • Personal Bridge
    • Tunnel Vision and Tunnel Crack Prevention
  • REST API
    • Partner API
  • Sample applications
    • Unified VPN SDK demo for Windows
    • Hydra VPN SDK demo for iOS
    • IPSEC VPN SDK demo for iOS
    • Unified VPN SDK demo for Android
    • Hydra VPN SDK demo for OpenWRT
    • OpenVPN configuration file
  • Resources
    • Use cases
      • Public VPN
      • Business VPN
        • Creating a Business VPN Project
        • Wi-Fi Security for Business
      • Application anti-blocking
    • How-to
      • Create a Firebase project for User Authentication
      • AWS CloudFront Distribution of the Platform URL
      • How can I get Shared Secret key from iTunes Connect for In-App Purchase
  • FAQ
    • General
      • VPN Platform Flow
      • What data is collected by the Platform?
      • What analytic data is collected by your SDK?
      • How the Platform restricts access to our data?
      • Why DNS Leak tests often indicate positive result?
      • Do we need to perform endpoint health checks?
      • How is the VPN exit node found?
      • How are streams re-marked if VPN is enabled/disabled on an active flow?
      • Is there a maximum number of supported devices?
      • Are both IPv4 and IPv6 supported?
      • What is the MTU of the tunnel?
      • Are any redundancy measures in terms of reliability provided?
      • Is there any load balancing?
      • Do you block broadcast and multicast to/from the VPN?
    • List of Open Source libs
Powered by GitBook
On this page
  • Setup for tvOS
  • Step 1: Project Structure
  • Step 2: Network Extension Setup
  • Step 3: Framework Integration
  • Step 4: Build Settings
  • Step 5: App Portal Configuration
  • Step 6: tvOS Specific Settings
  • Important Note on Location Changing and Content Access
  • Conclusion

Was this helpful?

  1. SDK
  2. Unified VPN SDK for Apple
  3. Setup
  4. Network Extension Setup

Network Extension Setup for tvOS

Setup for tvOS

By following these instructions, you will be able to successfully integrate WireGuard into your tvOS application.

Step 1: Project Structure

To begin, create a new WireGuard Network Extension target within your Xcode project. This target will house the necessary components for implementing the WireGuard VPN functionality. In addition to the Network Extension target, ensure that you have an Application target set up for your main tvOS app.

Step 2: Network Extension Setup

In the Info.plist file of your Network Extension target, set the NSExtensionPrincipalClass key to AFWireGuardTunnelProvider. This specifies the principal class for your network extension.

Next, create a new file named ProviderDelegate.swift and add the following code:

import WireguardTunnelProvider

class ProviderDelegate: NSObject, BaseNetworkExtensionDelegate {
    func vpnAppGroupData() -> VPNGroupData {
        VPNGroupData(groupID: "group.your.app.group", usesSystemExtension: false)
    }
    
    // Implement required delegate methods
}

This code defines a ProviderDelegate class that conforms to the BaseNetworkExtensionDelegate protocol. The vpnAppGroupData() method returns a VPNGroupData instance, specifying the app group ID and setting usesSystemExtension to false for tvOS.

Step 3: Framework Integration

To integrate the WireGuard framework into your project, follow these steps:

  1. Add the WireguardTunnelProvider.xcframework to your Network Extension target.

  2. In the "Embed" settings for the WireguardTunnelProvider framework, select "Do Not Embed" to avoid duplicating the framework in your app bundle.

  3. Link the required frameworks to your Network Extension target:

    • NetworkExtension

    • libz.tbd

    • libresolv.tbd

Step 4: Build Settings

In your Network Extension target's build settings, make the following changes:

  1. Set the "Enable Bitcode" option to "NO" to disable bitcode for the extension.

  2. Add the -ObjC flag to the "Other Linker Flags" setting to ensure proper linking of Objective-C code.

Step 5: App Portal Configuration

To enable the necessary capabilities for your app, follow these steps in the Apple Developer Portal:

  1. Enable the following capabilities for your app identifier:

    • Network Extensions

    • Personal VPN

    • App Groups

  2. Create a new App Group and enable it for both your Application and Network Extension targets.

  3. Generate and download the updated provisioning profiles for your targets.

Step 6: tvOS Specific Settings

When configuring the VPNGroupData for tvOS, make sure to set the usesSystemExtension property to false. This is specific to tvOS and differs from the configuration for other platforms.

Additionally, ensure that you use the correct bundle ID format for your tvOS network extension provider.

Important Note on Location Changing and Content Access

Implementing location changing capabilities through WireGuard does not guarantee access to region-locked content. The tvOS platform itself has built-in capabilities that inform streaming applications of the user's real geolocation, regardless of the geolocation established through a VPN connection. Streaming services may detect and restrict access based on the device's actual location rather than the apparent location provided by the VPN.

Conclusion

By following this step-by-step guide, you should now have a properly configured WireGuard SDK integrated into your tvOS application. Remember to thoroughly test your implementation and refer to the WireGuard documentation for any additional information or troubleshooting guidance.

If you encounter any issues or have further questions, don't hesitate to reach out to our support team for assistance.

PreviousNetwork Extension SetupNextBackend URL Configuration

Last updated 1 month ago

Was this helpful?