I am trying to select a file in the Finder, that is not happening the method works well in Obj-C but in Xamarin Finder gets activated but the file is not getting selected.
Whereas if I use Xamarin command to open the file it opens.
Here is the snippet of code that I wrote. Guide me if I am doing something wrong or missing anything?
public override void DidFinishLaunching(NSNotification notification)
{
string fullPath = "/Users/anoopvaidya/Desktop/A/ClientInfoConfig.cs";
NSUrl url = NSUrl.FromString(fullPath);
NSUrl[] urls = { url };
NSWorkspace.SharedWorkspace.OpenFile(fullPath);
//works. But I only want to select in Finder
NSWorkspace.SharedWorkspace.ActivateFileViewer(urls);
//doesn't work
}
Is it related to OS version? I am using 10.13.6.