Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staying connected (or reconnecting) for background processes #332

Closed
casparwylie opened this issue May 8, 2017 · 2 comments
Closed

Staying connected (or reconnecting) for background processes #332

casparwylie opened this issue May 8, 2017 · 2 comments

Comments

@casparwylie
Copy link

My system involves accessing network data when the app is in background. After a while trying to work out the problem, it turns out the socket connection drops once a user enters background. I've been struggling to find a successful work around. Is there anything in Starscream that would help?

@rmvz3
Copy link

rmvz3 commented May 17, 2017

Same here. I'm updating an app that used to work without problems in background but now it stop sending "keep alive" messages when the app goes background. Any workaround for this?

BTW, I'm talking about having the app in background (just closing the app, not killing the process). I can't have background modes in the app, just regular background operation

@daltoniam
Copy link
Owner

The standard app lifecycle will cause the socket connection drop when entering the background. Nothing "official" can be done to prevent that. In the past people use to abuse the VOIP background mode to allow this (see #309 for more details), but Apple frowned on this as it isn't the intend use case. As that issue notes, this restriction is now strictly enforced in iOS 10. The recommend course of action is to have a server that does all the processing and wakes the app up with push notifications with the new data you need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants