Post

Replies

Boosts

Views

Activity

Reply to React native expo background location send to firebase
I have developed an app designed to fetch real-time location updates and send them to Firebase. The app functions as follows. When the user clicks a button, the background location tracking starts, and the app begins sending location updates to Firebase every 10 seconds. While the app is running in the foreground, or even in the background (still present in recent apps), the location updates work as expected. However, the issue arises when the user swipes up to remove the app from the recent apps or multitasking screen. After this, the app stops sending background location updates to Firebase. To address this, I have already configured the necessary permissions in the Info.plist: NSLocationAlwaysUsageDescription NSLocationWhenInUseUsageDescription NSUserTrackingUsageDescription NSLocationAlwaysAndWhenInUseUsageDescription The purpose of this app is to track drivers' real-time locations. If a driver moves to a new location, I need to receive their location updates continuously until they manually stop the tracking by clicking the stop button in the app. However, if they remove the app from the background (swipe up), the location tracking stops, which interrupts the functionality of the app. I understand that iOS imposes strict limits on background execution, particularly after a user force-quits the app, but I would like to know if there are any recommended solutions or best practices that align with these limitations to ensure real-time location tracking can continue. Thank you for your guidance.
2w