7

I need to use Network Extension features in an app, particularly to use the Proxy features. The doc says:

Except when you use the NEHotspotHelper class, you do not need to obtain entitlements from Apple to use Network Extension classes. However, you still need to enable the Network Extension entitlement via the Developer portal. To request an entitlement to use the NEHotspotHelper class, visit https://developer.apple.com/contact/network-extension.

I went to the Developer portal, but I couldn't find how to enable the Network Extension entitlement. Is it because my role is "admin" rather than "team agent"? Or someone can tell me how to enable that entitlement?

mfaani
  • 33,269
  • 19
  • 164
  • 293
Massimo
  • 3,436
  • 4
  • 40
  • 68

3 Answers3

20

Due to the confused document and function missing of xcode 8.1, this cost me one whole week to find the solution.

  1. Make sure you enrolled apple developer program (it's not free, you need to pay $100 per year)
  2. Go to https://developer.apple.com/account/ios/identifier/bundle
  3. Select Identifiers => App IDs
  4. Click your app on the right(if there is no, you could create one with xcode),
  5. Click edit button, check the network-extension checkbox

NOTE1: Since November 10th 2016, you dont need entitlement from apple to use network-extension

NOTE2: If you are using Hotspot Helper, go to https://developer.apple.com/contact/network-extension/

If you are using VPN Manager, simply use capability menu of xcode project config.

Shaofei Cheng
  • 952
  • 9
  • 13
  • On your NOTE1: could you provide a source there? What I found, through Apple's developer program enrollment terms (20 Oct 2021): Network Extension Framework: "3.3.26 Your Application must not access the Network Extension Framework unless Your Application is primarily designed for providing networking capabilities, and You have received an entitlement from Apple for such access. " – Jorn Rigter Oct 20 '21 at 14:36
3

With Xcode 9 there is an easier way to add network extension entitlements inside Xcode.

  1. Add your developer account to Xcode from Preferences -> Account if you didn't add before.
  2. Select General tab from your app target and then set your developer account details.

enter image description here

  1. From your app target select Capabilities tab and select the switch right of the Network Extensions. Then select the capabilties you are going to use.

enter image description here

  1. Then check your YOUR_PROJECT_NAME.entitlements plist file. Capabilities you selected should be on the Network Extensions list. enter image description here

  2. As a last step check your AppId from developer portal if everything is fine.

abdullahselek
  • 7,893
  • 3
  • 50
  • 40
2

Edit your App ID on Apple's dev portal and look for the Network Extensions capability/service. You also need Personal VPN to create and manage configurations in your app.

The Network Extensions option is new. I'm not sure when it appeared, maybe in the last six months?. It used to be you had to request permission for it and it'd show up under the provisioning profile entitlements, but now Apple's opened it up to everyone.

You might also need to add this to your entitlements file(s). At least you used to - I'm not positive about needing this with the new approach:

<key>com.apple.developer.networking.networkextension</key>
<array> 
  <string>app-proxy-provider</string> 
  <string>content-filter-provider</string> 
  <string>packet-tunnel-provider</string>
</array>
Eric McNeill
  • 1,784
  • 1
  • 18
  • 29