Closed iulianmargeloiu closed 8 years ago
This is probably related to the fact that iOS does not let you do background execution unless you specify one of the background execution modes. Most of which won't apply to socketio
Hi, thanks for very quick response.
I already have background execution mode enabled. I am using 'audio' one, and is playing perfectly on background or if phone is locked.
Does it happen when the audio stops? iirc the app can get suspended if the audio stops.
I'm not that experienced with iOS development so my knowledge on this subject is limited.
Many thanks...
I already did the same, and seems it is fine.. but still there are some strange situations when socket disconnects again - eg: incoming call...
Thanks a lot
@bubblebytes, I am also going through the same issue, but when I activated Audio and VoIP background modes (and marked the socket.io client as voip = true while initializing) the connected socket is giving me the log as
2016-03-30 12:11:12.213 GSLVideoCallApp[3318:1287745] LOG SocketEngine: Writing ws: has data: 0 2016-03-30 12:11:12.214 GSLVideoCallApp[3318:1287745] LOG SocketEngine: Sending ws: as type: 2 2016-03-30 12:11:12.218 GSLVideoCallApp[3318:1287744] ERROR SocketEngine: connection closed by server
When I am switching the app to background and 2-3 minutes after locking the phone.
@bubblebytes, You better to use push notifications when you are using socketio. We can't keep application in background mode, iOS will not allow your own background services unless you use specified background capabilities like Audio, Voip, location services. That too each background capability has their own kind of execution.
Hi guys,
I have a very strange issue with SocketIO. I need to get socket events in background, even phone is locked, or app is background.
But currently after 1-2 minutes, after I locked the phone, I got message: "socket disconnected"
Anyone can help with this? What solutions I have?
Thanks in advance