[NEVPNManager sharedManager] is always nil

I want to create an OS X El Capitan VPN app that uses the NetworkExtension.framework. But I always become nil from the [NEVPNManager sharedManager] (NEVPNManager.sharedManager()). Therefore I am still at the beginning. What could be the problem? There are no VPN entitlements for OS X Apps.

This is what i did:

I created a new Objective C OS X Cocoa Application and placed a button in the Main.storyboard that creates a NEVPNManager: NEVPNManager *manager = [NEVPNManager sharedManager]; I cannot go further, because manager is always nil. (I tried it with a Swift project, but it does the same).

I included the NetworkExtension.framework in Build Phases -> Link Binary With Libraries.

Of course I imported the framework in the ViewController class: #import <NetworkExtension/NEVPNManager.h>


Thanks!

I have this issue sometimes on iOS. I only restart app and it's alright again.😐

I have this issue too. But worse, in Swift, the sharedManager() function is defined to return NEVPNManager, not an Optional<NEVPNManager>. A 'nil' is an impossibility and yet, it is there.

[NEVPNManager sharedManager] is always nil
 
 
Q