You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cordova iOS apps cannot execute JavaScript in the background (except in certain circumstances). JS execution is paused after about 3 seconds. You can verify this with the following code:
document.addEventListener('pause',()=>{console.log('pause handler');setTimeout(()=>console.log('Still running!'),1000);setTimeout(()=>console.log('Still running!'),2000);setTimeout(()=>console.log('Still running!'),3000);// the following line is not executed until the app is back in the foregroundsetTimeout(()=>console.log('Still running after more than 3 seconds!'),4000);});
With the default 60-second timeout, this package won't end up disconnecting before JS execution is paused.
For what it's worth, I'm trying the following simple approach (inspired by this package) to disconnect only in Cordova and Chrome (as discussed in #11):
document.addEventListener('resume',()=>{Meteor.reconnect();});document.addEventListener('pause',()=>{Meteor.disconnect();});document.addEventListener('freeze',()=>{// for ChromeMeteor.disconnect();});
The text was updated successfully, but these errors were encountered:
Cordova iOS apps cannot execute JavaScript in the background (except in certain circumstances). JS execution is paused after about 3 seconds. You can verify this with the following code:
With the default 60-second timeout, this package won't end up disconnecting before JS execution is paused.
For what it's worth, I'm trying the following simple approach (inspired by this package) to disconnect only in Cordova and Chrome (as discussed in #11):
The text was updated successfully, but these errors were encountered: