BTW, here
is a command line tool seeming to work as required, in Swift.
Essentially, it uses the following simple code
´´´
if !urls.isEmpty {
NSWorkspace.shared.activateFileViewerSelecting(urls)
}
´´´
This api should be available in Objective-C just the same.
Just found the post below exposing your code, which seems to be different:
My bottom line is: the swift example does a better job than the built in extension. IMHO. 
Thanks!