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

Strange, strange behavior on iOS. Meteor.call will not work while phone is in the background. #1

Open
pmwisdom opened this issue Sep 10, 2015 · 3 comments

Comments

@pmwisdom
Copy link

I installed this plugin and all of the sudden all my background geolocation updates stopped occurring, which happen through a series of meteor calls. I uninstalled the plugin and just like that they started up again. No clue why that would be

@mbanting
Copy link
Owner

That's weird. Thanks for letting me know. Do you know if it has anything to do with the geolocation lookup? Or is it strictly an issue with Meteor.call not being invoked anymore while in the background?

@pmwisdom
Copy link
Author

Geolocation was good. Geo Callback fired, but any Meteor.call in the callback was "put on hold" until I put the app back in the foreground and then they all spooled up and fired. Without the plugin they all occurred correctly.

So if I did:

function(location) { //Callback for location from bgGeo plugin
    console.log('Before Meteor.call')
    Meteor.call('ping')
    console.log('After Meteor.call')
}

It would log the outputs to the console while inspecting the device, and then when I would put the app back in the foreground all the meteor.call's that piled up would trigger and I would see a pong outputted on the server.

I'll test it out a little more when I have time.

@TechplexEngineer
Copy link

I had a very similar problem. But on Android. It seemed that nothing would happen when the app was in the background. I found that in the dependency "skinnygeek1010:[email protected]" there was a call to meteor.disconnect() this was the problem.

We pulled the package local and removed the dep and just pulled the addEventListener calls into the package removing the calls to meteor.disconnect() and meteor.reconnect().

Hope that helps

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