Do we need to deconnect / reconnect Meteor when app goes in background?


#1

Hi,

Months ago I came across the practice of disconnecting / reconnecting Meteor upon Cordova ‘pause’ and ‘resume’ events.
There is a plugin for this https://github.com/AdamBrodzinski/Meteor-Cordova-Status/blob/master/cordova-status.js
And some old (old in javascript time I mean :smile:) code or discussion like here and there.
But I cannot find any ‘official’ guidance on this, nor any recent discussion. Is it something we still need in a Cordova app (at least for iOS)?
Because I never experienced crash on iOS without this until recently.
My app is sometimes crashing on iOS when in background for a long time. Not sure if it is related but I don’t want to miss anything here.

Thanks


#2

+1, we’re also facing the same issue recently


#3

Really? This is interesting.
Our issue is the following: app is loaded, put in background, and when opened again several hours later it reloads and immediately closes during the splash screen.
Then, it is still showing in the “app manager” (double tap on home button) but crashing at the splash screen every time we try to launch it, and even after we kill the app. We actually need to restart the device to be able to launch the app again (but according to Internet, this seems to be a frequent problem for iOS users with any app…)

First I thought it was a memory problem, but it may also be related to the fact that for now I am not stopping tasks when Cordova trigger ‘pause’ event (we are still scanning for iBeacons, not closing the Meteor connection, etc)

It is still quite hard to reproduce the issue. And it does not seem related to a specific device or iOS version (got the bug on iPhone 4S and 6S with iOS 7.1.1 and 9.0.1/9.0.2.