Re: Cocoa (or any Mac API) "browse for computer" dialog
Re: Cocoa (or any Mac API) "browse for computer" dialog
- Subject: Re: Cocoa (or any Mac API) "browse for computer" dialog
- From: Dan Korn <email@hidden>
- Date: Fri, 09 May 2014 10:33:49 -0700
- Acceptlanguage: en-US
- Thread-topic: Cocoa (or any Mac API) "browse for computer" dialog
I appreciate all the responses, but unfortunately I’m not finding them helpful.
On May 8, 2014, at 11:27 PM, Chris Hanson <email@hidden> wrote:
> Note that you don’t browse for computers on a network; rather, you browse for services on a network. Only computers offering the service for which you’re browsing will show up — and really, what use are computers to your users that aren’t offering the service? :)
That may be how you think my application should work, but in fact, I (my users) actually DO browse for computers on a network. They need to locate a machine on the LAN that’s running a particular Windows service which is listening on a TCP socket port. There’s no “advertising” of the service, and I don’t really want to go trying to connect to the service on every machine on the LAN in turn. And adding some kind of Bonjour service to the hundreds of existing installations of our service on customers’ servers is a non-starter.
Obviously not every machine on the network is running the service to which the user wants to connect from the client app, but at least presenting a list of machines on the LAN gives users something to choose from, so that they have a bit of assistance in locating the server, instead of having to manually type in the machine name, with the correct spelling, or an IP address. This is a very useful feature of the client app on Windows, and users rightly complain that the Mac version does not offer this feature. Why can’t our Mac users have this same functionality? I realize that a Mac doesn’t have the same concept of being on a domain that a Windows machine does, but it is on a LAN, and it does see all those other computers.
> What you’re looking for are NSNetService and NSNetServiceBrowser, they allow you to browse via Bonjour for all of the services on both the local networks and any wide-area Bonjour networks that the user has joined.
I don’t understand what you mean here. Do those classes really let you browse for “all of the services?” Because everything I’ve read says that you can only browse for one kind of service at a time.
All I want to do is to have access to the functionality in the Finder to see the list of machines. What “service” are all the machines on my network advertising now that the Finder sees?
> I recommend the “NSNetServices and CFNetServices Programming Guide” at <https://developer.apple.com/library/mac/documentation/Networking/Conceptual/NSNetServiceProgGuide/Introduction.html> as a good starting point; the classes are very easy to use.
Yes, I’ve looked at that. Regardless of how easy the classes are to use, what it doesn’t tell me is what magic service code I need to use to get the same list of machines that the Finder shows. I can issue commands in the Terminal like "dns-sd -B _smb”, but it doesn’t even list all the Samba machines on the network, even ones I’m currently connected to via Samba. There’s a handy “Bonjour Browser” app that I found, but even that doesn’t show all the machines that the Finder does.
So, using Bonjour, what is/are the service code/codes for “all machines on the network,” as seen by the Finder?
Can anyone actually answer my question: Is it possible to just present the same list of computers that the Finder shows in a dialog in my app?
On May 8, 2014, at 11:24 AM, Jerry Krinock <email@hidden> wrote:
> A better list would be email@hidden.
Sorry for the meta-discussion, but I went here:
https://lists.apple.com/mailman/listinfo/macnetworkprog
And I filled out the form under "Subscribing to Macnetworkprog,” and then it said, "Your subscription request has been received, and will soon be acted upon,” etc. But I never got any confirmation email. It’s been over 12 hours now. Something is not right with lists.apple.com.
Thanks,
Dan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden