2

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:

  1. ServerApp creates a GKSession in GKSessionModeServer mode (Bluetooth only)
  2. ClientApp detects the server and connects to it
  3. 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.

alegiac
  • 33
  • 6

1 Answers1

0

Perhaps you could keep the app running in the background by setting the info.plist flag to keep it alive like a music player?

This thread talks about this:

From Raaz

Community
  • 1
  • 1
Tim
  • 1,108
  • 13
  • 25