Network Extension not launching properly

The network extension on iOS 13 does not seem to call


override func startTunnel(options: [String : NSObject]?, completionHandler: @escaping (Error?) -> Void)


to kick off the process. I see the process get started from watching thr debugger and console but it never fully launches.


I see in the console some odd logs such as


Client ‘com.apple.locationd’ is attempting to masquerade as uninstalled app with effective bundle identifier ‘com.myApp.PacketTunnel’



-CMSessionMgr- CMSessionMgrHandleApplicationStateChange: CMSession: Sending stop command to com.myApp.PacketTunnel with pid '1315' because client is background suspended and there is no AirPlay video session for it.


[xpcservice<com.myApp.PacketTunnel>:1731] Set jetsam priority to 3 [0] flag[1] default 15:48:28.477664 -0400 runningboardd [xpcservice<com.myApp.PacketTunnel>:1731] Resuming task. default 15:48:28.477729 -0400 runningboardd [xpcservice<com.myApp.PacketTunnel>:1731] Error 45 setting darwin role to UserInteractiveNonFocal: Operation not supported, falling back to setting priority default 15:48:28.477801 -0400 runningboardd Finished acquiring assertion 26-1731-6205 (target:xpcservice<v>) default 15:48:28.477870 -0400 runningboardd [xpcservice<com.myApp.PacketTunnel>:1731] Set darwin priority to: PRIO_DEFAULT default 15:48:28.477900 -0400 runningboardd [xpcservice<com.myApp.PacketTunnel>:1731] Set GPU priority to "deny" default 15:48:28.478317 -0400 kernel memorystatus: set assertion priority(14) target PacketTunnel:1731 default 15:48:28.478420 -0400 runningboardd Finished acquiring assertion 26-233-6206 (target:xpcservice<com.myApp.PacketTunnel>) default 15:48:28.478639 -0400 runningboardd [xpcservice<com.myApp.PacketTunnel>:1731] Set jetsam priority to 14 [0] flag[1] default 15:48:28.478684 -0400 runningboardd [xpcservice<com.myApp.PacketTunnel>:1731] Set GPU priority to "allow" default 15:48:28.478852 -0400 runningboardd Invalidating assertion 26-1731-6205 (target:xpcservice<com..myApp.PacketTunnel>) from originator 1731 default 15:48:28.487480 -0400 runningboardd Calculated state for xpcservice<com.myApp.PacketTunnel>: running-active (role: UserInteractiveNonFocal) default 15:48:28.487539 -0400 mediaserverd -CMSessionMgr- CMSessionMgrHandleApplicationStateChange: CMSession: Client com.myApp.PacketTunnel with pid '1731' is now Background Suspended. Background entitlement: NO ActiveLongFormVideoSession: NO WhitelistedLongFormVideoApp NO default 15:48:28.487664 -0400 mediaserverd -CMSessionMgr- CMSessionMgrHandleApplicationStateChange: CMSession: Sending stop command to com.myApp.PacketTunnel with pid '1731' because client is background suspended and there is no AirPlay video session for it default 15:48:28.487709 -0400 mediaserverd 1179: pid 1731(PacketTunnel) default 15:48:28.487744 -0400 runningboardd Calculated state for xpcservice<com.myApp.PacketTunnel>: running-active (role: UserInteractiveNonFocal) default 15:48:28.488211 -0400 mediaserverd -CMSessionMgr- CMSessionMgrHandleApplicationStateChange: CMSession: Client com.myApp.PacketTunnel with pid '1731' is now Background Running. Background entitlement: NO ActiveLongFormVideoSession: NO WhitelistedLongFormVideoApp NO default 15:48:28.488318 -0400 mediaserverd -CMSessionMgr- CMSessionMgrHandleApplicationStateChange: CMSession: Sending stop command to com.myApp.PacketTunnel with pid '1731' because client is not allowed to play in the background AND does not continue AirPlaying video when device locks default 15:48:28.488597 -0400 mediaserverd 1179: pid 1731(PacketTunnel) default 15:48:28.488682 -0400 PacketTunnel Invalidating plugin handshake assertion id <private> default 15:48:28.495328 -0400 PacketTunnel nw_path_evaluator_start [1E36EFBD-6567-4A46-8C22-24C67A5E20F1 <NULL> generic, indefinite] path: satisfied (Path is satisfied), interface: en0, ipv4, dns default 15:48:28.589316 -0400 locationd {"msg":"#CLIUA Marking unbalanced change", "clientKey":"com.myApp.PacketTunnel", "reason":"SpringBoard Announced NotInUse", "isInUse":0} default 15:48:28.591382 -0400 runningboardd Calculated state for xpcservice<com.myApp.PacketTunnel>: running-active (role: UserInteractiveNonFocal) default 15:48:28.602558 -0400 locationd {"msg":"#CLIUA Marking unbalanced change", "clientKey":"com.myApp.PacketTunnel", "reason":"SpringBoard Announced NotInUse", "isInUse":0}