Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The peerID used in GameKit framework, is always unique for each device?

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!

like image 314
nico Avatar asked Jul 21 '09 19:07

nico


1 Answers

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.

like image 177
Ben Lachman Avatar answered Oct 22 '22 08:10

Ben Lachman