• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa (or any Mac API) "browse for computer" dialog
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa (or any Mac API) "browse for computer" dialog


  • Subject: Re: Cocoa (or any Mac API) "browse for computer" dialog
  • From: Chris Hanson <email@hidden>
  • Date: Thu, 08 May 2014 21:27:15 -0700

On May 8, 2014, at 9:02 AM, Dan Korn <email@hidden> wrote:

I thought this would be pretty easy, but I’m having a heck of a time figuring out how to present a dialog to the user to select (choose) from a list of computers on the network.

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.

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? :)

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.

  -- Chris

 _______________________________________________
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

  • Follow-Ups:
    • Re: Cocoa (or any Mac API) "browse for computer" dialog
      • From: Dan Korn <email@hidden>
References: 
 >Cocoa (or any Mac API) "browse for computer" dialog (From: Dan Korn <email@hidden>)

  • Prev by Date: Re: Code-signing oddness
  • Next by Date: Field/Replace Problem
  • Previous by thread: Re: Cocoa (or any Mac API) "browse for computer" dialog
  • Next by thread: Re: Cocoa (or any Mac API) "browse for computer" dialog
  • Index(es):
    • Date
    • Thread