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

SocketIO pauses when app enters into background. ( Swift 3, iOS 10 ) #627

Closed
ghost opened this issue Mar 6, 2017 · 8 comments
Closed

SocketIO pauses when app enters into background. ( Swift 3, iOS 10 ) #627

ghost opened this issue Mar 6, 2017 · 8 comments

Comments

@ghost
Copy link

ghost commented Mar 6, 2017

I want to try local notifications using SOCKETIO., when the app is running on simulator everything is fine and displaying values even when the app enters into background.
But when It's running on iPhone, when the app enters into background task suspends/ get paused. Please help me regarding this issue.

@nuclearace
Copy link
Member

Right, because iOS doesn't allow background networking unless you have a certain permission enabled, and then you must start a background task.

@NyeinEiEiTun
Copy link

NyeinEiEiTun commented Mar 7, 2017

I also happened same case like you. But in my case, i called soketio.run() function in the "applicationWillEnterForeground" function of AppDelegate. Hope this helps you

@NyeinEiEiTun
Copy link

NyeinEiEiTun commented Mar 7, 2017

Please use "connect" .I am using this swift library from objective-c project. Here is my code.
screen shot 2017-03-07 at 3 56 48 pm

Uploading Screen Shot 2017-03-07 at 3.57.22 PM.png…

we can connect or disconnect to socket.io

@andrebraga
Copy link

Sure, because you're not heeding @nuclearace 's advice:

Right, because iOS doesn't allow background networking unless you have a certain permission enabled, and then you must start a background task.

Please read on background tasks on iOS and the iOS background permissions. Hint:
UIApplication beginBackgroundTask(withName taskName: String?, expirationHandler handler: (() -> Void)? = nil) -> UIBackgroundTaskIdentifier

@DoktorBog
Copy link

I have same issues too! Socket service go to disconnect after 5 minute

@fukemy
Copy link

fukemy commented Nov 19, 2018

did someone solve it?

@Rajapandian-Subramanian-Dev

did someone solve it?
+1

Did anyone found a way to achieve this using the legacy VoIP capability?

@Akbar-khan-shinwari
Copy link

I am facing exactly the same issue, did anyone fix it.

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

7 participants