We started developing a VPN app in swift. Network extension is configured with profiles
App entitlement is
<plist version="1.0">
<dict>
<key>com.apple.developer.networking.networkextension</key>
<array>
<string>packet-tunnel-provider</string>
<string>app-proxy-provider</string>
<string>content-filter-provider</string>
</array>
<key>com.apple.developer.networking.vpn.api</key>
<array>
<string>allow-vpn</string>
</array>
<key>com.apple.security.application-groups</key>
<array/>
</dict>
</plist>
The Network Extension is a subclass of NEPacketTunnelProvider with the following entitlements
<plist version="1.0">
<dict>
<key>com.apple.developer.networking.networkextension</key>
<array>
<string>packet-tunnel-provider</string>
<string>app-proxy-provider</string>
<string>content-filter-provider</string>
</array>
<key>com.apple.developer.networking.vpn.api</key>
<array>
<string>allow-vpn</string>
</array>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.application-groups</key>
<array/>
<key>com.apple.security.network.client</key>
<true/>
</dict>
</plist>
I've overrided init to log the initiailization.
override init() {
super.init()
NSLog("NE Provider init")
}
Xcode is version 12.5 on macos 11. The signing profile is set to automatic for both app and extension.
After starting the vpn using the app I got the following error:
Failed to start extension com.mxxxxx.Sxxxxx.PacketTunnel: Error Domain=PlugInKit Code=4 "RBSLaunchRequest error trying to launch plugin
com.mxxxxx.Sxxxxx.PacketTunnel(XXXXXXX-1C0A-427F-8D6D-F9608D5B3C42):
Error Domain=RBSRequestErrorDomain Code=5 "Launch failed."
UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x954f11100
{Error Domain=NSPOSIXErrorDomain Code=85 "Bad executable (or shared library)" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}"
UserInfo={NSLocalizedDescription=RBSLaunchRequest error trying to launch plugin com.mxxxxx.Sxxxxx.PacketTunnel(XXXXXXXXX-1C0A-427F-8D6D-F9608D5B3C42):
Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed.,
NSUnderlyingError=0x954f11100 {Error Domain=NSPOSIXErrorDomain Code=85 "Bad executable (or shared library)" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}}
Any advice please?