Open jaddoescad opened 7 years ago
very annoying issue, when I subscribe to my messages, sometimes i get info, sometimes i dont. my guess is somehow it thinks that there is nothing to load, i'm not sure why. you should try and look at meteor-ios,never happened to me there.
a workaround is to also use abstract collection notifications, it may give them to you one by one, but it mostly never fails
I can't tell what you're doing from the code you've provided. But I see a number of potential problems. First, you shouldn't put your navigation logic inside subscription callback. That's opening up a number of potential problems and is going to make this harder to reason about. Second, you shouldn't define your collections inside your view controllers. When you navigate away users is going to disappear.
What do your DDP logs look like on the client. They'll show you exactly what is being transmitted from the server.
The following code above is supposed to retrieve the user's information when I subscribe to "users". The problem is sometimes I get null for user information. I'm really not sure why?
this is my server code:
How can I make sure that the closure is only triggered once I am ready to receive everything.