• 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: how to archive NSNetService?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to archive NSNetService?


  • Subject: Re: how to archive NSNetService?
  • From: "A.M." <email@hidden>
  • Date: Fri, 16 Jan 2009 18:44:54 -0500


On Jan 16, 2009, at 5:00 PM, Allyn Bauer wrote:

Hello all,
I'm writing a fairly simple server <-> client app. The server
publishes a network name using Bonjour and clients get a list of
names. They choose one (for now). After this choice, I would like the
selection to somehow be saved using NSUserDefaults. I'm assuming the
easiest way to do this is to get the name of the saved network and
save that string. Is this assumption correct? If not, how would you
suggest I accomplish this? Is there anyway to save the enough network
information to reconnect to the same server even if the network name
has been changed?

The goal is to be able to automatically reconnect to an already chosen
network -- if there's one saved -- when the app loads.

I'm still learning this stuff, but it's becoming slightly easier.
Thanks for the help.

There isn't anything reliable that you can save to be certain that you will be connecting to the same service. Network conditions change. I would suggest adding a UUID to the TXT record of the server's NSNetService to uniquely identify that instance of the server.


Cheers,
M
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >how to archive NSNetService? (From: Allyn Bauer <email@hidden>)

  • Prev by Date: Re: ObjC in time-critical parts of the code
  • Next by Date: Re: modifier-flags with no key pressed and mouseDown 256, why?
  • Previous by thread: Re: how to archive NSNetService?
  • Next by thread: mergeChangesFromContextDidSaveNotification effects
  • Index(es):
    • Date
    • Thread