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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to