views:

306

answers:

1

Hello. The peerID assigned to your device in a GKSession, is it always the same for the same device? I mean, every time you create a GKSession, your peerID will be the same one? or a random one is assigned everytime you create a GKSession? How is this peerID generated?

thanks!

+5  A: 

Just ran the GameKit sample code a couple times and it looks like peerIDs are created randomly each time you create a new GKSession.

For instance:

1st Run:

remote peerID = 599103133

session.peerID = 1227554288

2nd Run:

remote peerID = 990301845

session.peerID = 1731464655

No idea how these are being generated but they're stored as NSStrings which is kind of odd to me.

Ben Lachman