Getting list of preferred wifi networks on Mac with Swift 3

Is there a way to get the list of preferred ( = saved) wifi's ssid on MacOS with Swift 3.0 ? I found some example which are deprecated and are (surprisingly) only runnable on iOS.