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

Re: Can MCPeerID be used as a key in a dictionary?


  • Subject: Re: Can MCPeerID be used as a key in a dictionary?
  • From: "Quinn \"The Eskimo!\"" <email@hidden>
  • Date: Fri, 23 May 2014 11:14:31 +0100

On 23 May 2014, at 10:54, Rick Mann <email@hidden> wrote:

> One more thing, is it appropriate to archive it in the iCloud KVS so that a person appears the same across all their devices?

That comes back to the question of identity.  Is Quinn on Mumford (my iPhone) the same as Quinn on Io (my iPad).  I suspect that the answer is no, because if you make them the same then I won't be able to communicate between Mumford and Io.

Regardless, if you do send MCPeerID archives between machines (via iCloud or whatever) you will have to be careful about collisions.  Multipeer Connectivity expects them to be unique and, while I haven't tried this myself, I doubt it'll behave well if two identical peers try to come online.

Remember that Multipeer Connectivity is implemented in terms of Bonjour.  The big random number for the peer is actually used as the Bonjour service name, and Bonjour won't let you register two services with the same name and type in the same domain.

WARNING: The Bonjour stuff is an implementation detail.  Don't build this knowledge into your code otherwise you may break as the implementation evolves.

Share and Enjoy
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware


 _______________________________________________
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: Rick Mann <email@hidden>
References: 
 >Can MCPeerID be used as a key in a dictionary? (From: Rick Mann <email@hidden>)
 >Re: Can MCPeerID be used as a key in a dictionary? (From: "Quinn \"The Eskimo!\"" <email@hidden>)
 >Re: Can MCPeerID be used as a key in a dictionary? (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: Can MCPeerID be used as a key in a dictionary?
  • Next by Date: Re: Can MCPeerID be used as a key in a dictionary?
  • Previous by thread: Re: Can MCPeerID be used as a key in a dictionary?
  • Next by thread: Re: Can MCPeerID be used as a key in a dictionary?
  • Index(es):
    • Date
    • Thread