Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 GKSession 中分配给您设备的 peerID,对于同一设备是否始终相同?我的意思是,每次创建 GKSession 时,您的 peerID 都会是同一个?还是每次创建 GKSession 时都会随机分配一个?这个 peerID 是如何生成的?
谢谢!
刚刚运行了几次 GameKit 示例代码,看起来每次创建新的 GKSession 时都会随机创建 peerID。
例如:
第一次运行:
远程对等 ID = 599103133
session.peerID = 1227554288
第二次运行:
远程对等 ID = 990301845
session.peerID = 1731464655
不知道这些是如何生成的,但它们被存储为 NSStrings,这对我来说有点奇怪。