3

I've developed a communication application and I'm beginning to notice that my app doesn't receive Firebase event calls when the app is in the background. I found this question that touches on network operations in the background, but I sort of assumed the Firebase library handled these things.

How can I do things like updating the badge on new messages when it my firebase events aren't fired unless the app is open?

Community
  • 1
  • 1
Forest Kunecke
  • 2,160
  • 15
  • 32

1 Answers1

1

I figured out what my problem was. I am using a singleton for my message data receiver, and by calling its setup function (which calls the .observe methods for various Firebase locations) in my AppDelegate instead of in the the viewDidLoad method for my message view controller, I got it working perfectly! pretty inconsistently.

Sometimes it updates it immediately, while other times it updates with a delay, still other times the app badge doesn't update at all until I force close and restart it. If someone knows a more reliable solution I would love to hear it.

Forest Kunecke
  • 2,160
  • 15
  • 32