I've a problem working with GameKit and GKSession operations. I'm trying to implement a GKSession client-server iOS app system (ServerApp, ClientApp) having this behavior:
- ServerApp creates a GKSession in GKSessionModeServer mode (Bluetooth only)
- ClientApp detects the server and connects to it
- Some data exchange between apps and stuff
Everything is going fine except when ServerApp or ClientApp instance goes to background. If ServerApp goes to background, Client receives a GKPeerStateUnavailable event and i can't connect to it. What I need is to avoid this event: that means, find a way to keep ServerApp GKSession socket going even when app is in background.
Any help will be appreciated.