• 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
Can MCPeerID be used as a key in a dictionary?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can MCPeerID be used as a key in a dictionary?


  • Subject: Can MCPeerID be used as a key in a dictionary?
  • From: Rick Mann <email@hidden>
  • Date: Thu, 22 May 2014 18:33:55 -0700

I sent this to Cocoa-dev, but realize it might be better here. Sorry for those on the other list.

---

Is MCPeerID usable as a key? It can be used as a key, I've verified that, but will I only ever get the same instance for a specific peer, even after disconnecting and re-connecting? If the instances are different, are the -hash and -equals: methods properly overridden?

If not, how can I map peers to data structures in my code? Should each peer generate a UUID that remains constant for the life of the app on that device, and send that over during connection?

Thanks!

--
Rick




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Can MCPeerID be used as a key in a dictionary?
      • From: "Quinn \"The Eskimo!\"" <email@hidden>
  • Prev by Date: Re: SCNetworkReachability not checking proxy settings in firewalled environment
  • Next by Date: Re: Can MCPeerID be used as a key in a dictionary?
  • Previous by thread: Re: SCNetworkReachability not checking proxy settings in firewalled environment
  • Next by thread: Re: Can MCPeerID be used as a key in a dictionary?
  • Index(es):
    • Date
    • Thread