Connecting a client to a server using GKSession
What is the proper way to connect two apps using GKSession
, where one acts as a GKSessionModeClient
and one as a GKSessionModeServer
?
For the server, does it start listening after initWithSessionID:displayName:sessionMode:
is called and available
is set to YES
?
How do I search for the server with the client? After I initialize a GKSession
with the same session ID, I'm not sure how to look for the server and connect to开发者_如何学Python it.
I figured out the problem. The client GKSession
also needs available
set to YES
in order to begin searching. The GKSessionDelegate
will then be called.
精彩评论