TEAM LICENSES: Save money and learn new skills through a Hacking with Swift+ team license >>

Background Tasks from push notification: FCM and BGProcessingTaskRequest

Forums > SwiftUI

Hie, I have a project that uses FCM (Firebase Cloud Messaging) for notifying the app of data that was updated, created or deleted. The payload includes enough data on what on either of those 3 above mentioned operations then updates my core data entities. This unfortunetly only works if the App is in the foreground, but I can't for the life of me find out how to do it in the background. What I need is for the app to update my core data entity even if the app is in the background state when it receives a notification.

My plea is, does anyone have a guide that shows how to trigger/run any tasks in the background after receiving a notification from FCM. Any minimalistic application of that would work for me then I can attempt to implement it from my end.

3      

Hacking with Swift is sponsored by RevenueCat.

SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.

Learn more here

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.