Network extension provotion in xcode 8.1 /swift?

Hi, it seems Network extension provotion(com.apple.developer.networking.networkextension) is removed from capability list.


I've only got vpn setting api (com.apple.developer.networking.vpn.api) in the entitlement file.


But when using NETunnelProviderManager .saveToPreferences, it goes to


Failed to save configuration: Error Domain=NEVPNErrorDomain Code=5 "permission denied" UserInfo={NSLocalizedDescription=permission denied}



Is this a provotion issue?

How could I fix it?

Finally, resolved this issue by myself.



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.

Network extension provotion in xcode 8.1 /swift?
 
 
Q