In my Objective-C application, I use this code to open a website in the user's browser:
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"https://blah.com/"]];
It works great. However, there is one small problem; if the user has already opened "blah.com" in his web browser, calling it, he creates a new tab.
It would be better if the user simply switched to the existing tab in these cases.
Is there any way to do this? Please note that I would also like to switch to an existing tab if the tab is on the subpage "blah.com", for example "blah.com/some/page.html".
source share