# Network Extension Setup

## Overview

A network extension is a separate process that runs alongside your main application and handles the VPN connection. This step involves creating a new target in your Xcode project, configuring its build settings, and implementing the necessary code to establish and manage the VPN connection.

## Prerequisites

You should already have prepared application target in order to continue. If you haven't done it yet, please see [Application Setup](/paas/sdk/unified-vpn-sdk-for-apple/setup/application-setup.md).

## Choose Your Setup Guide

Select the setup guide based on your target platform and extension type:

| Platform    | Extension Type        | Guide                                                                                                                                                 |
| ----------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| iOS / macOS | Application Extension | [Application Extension Setup (iOS/macOS)](/paas/sdk/unified-vpn-sdk-for-apple/setup/network-extension-setup/application-extension-setup-ios-macos.md) |
| tvOS        | Application Extension | [Application Extension Setup (tvOS)](/paas/sdk/unified-vpn-sdk-for-apple/setup/network-extension-setup/network-extension-setup-for-tvos.md)           |
| macOS       | System Extension      | [System Extension Setup (macOS)](/paas/sdk/unified-vpn-sdk-for-apple/setup/network-extension-setup/system-extension-setup-for-macos.md)               |

## Which Extension Type Should I Use?

### Application Extension

Use Application Extensions when:

* Distributing through the **Mac App Store**
* Building for **iOS** or **tvOS**
* Building **sandboxed** applications
* Supporting older macOS versions (before 10.15)

### System Extension

Use System Extensions when:

* Distributing **outside the Mac App Store** (Developer ID)
* Building enterprise or developer tools
* Requiring maximum performance and stability
* Targeting **macOS 10.15 (Catalina) and later**

{% hint style="info" %}
System Extensions are only available on macOS. iOS and tvOS applications must use Application Extensions.
{% endhint %}

## Quick Comparison

| Aspect            | Application Extension     | System Extension                |
| ----------------- | ------------------------- | ------------------------------- |
| **Platforms**     | iOS, macOS, tvOS          | macOS only                      |
| **Distribution**  | App Store or Developer ID | Developer ID only               |
| **Sandbox**       | Required                  | Not required                    |
| **Activation**    | Automatic                 | Manual (requires user approval) |
| **macOS Version** | All supported versions    | 10.15+                          |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://pango.gitbook.io/paas/sdk/unified-vpn-sdk-for-apple/setup/network-extension-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
