Tyler Pierog
Tyler Pierog

Reputation: 537

keeping track of push notifications while in background Swift

I'm trying to listen for a push notification while the app is running in the background. This is because when the app re enters the foreground I need it to update a counter of how many push notifications I received while I was in the background. Now when you click the push notification it brings you back to the app and updates fine, however if you press the home button receive a push notification and then reopen the background app manually the notification data is lost. How would I go about this?

Upvotes: 1

Views: 327

Answers (1)

Tyler Pierog
Tyler Pierog

Reputation: 537

To solve my problem I added 'content-available' => 1

Upvotes: 1

Related Questions