From 6f628979c632be7be12bddd52a8b56b105e6cbee Mon Sep 17 00:00:00 2001 From: devthejo Date: Thu, 24 Jul 2025 07:11:54 +0200 Subject: [PATCH] fix(ios-headless): wip --- index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 074958b..6e578f9 100644 --- a/index.js +++ b/index.js @@ -57,7 +57,11 @@ const HeadlessTask = async (event) => { if (Platform.OS === "android") { BackgroundGeolocation.registerHeadlessTask(HeadlessTask); } else if (Platform.OS === "ios") { - BackgroundGeolocation.onLocation(async (_location) => { + BackgroundGeolocation.onLocation(async () => { + await executeHeartbeatSync(); + }); + + BackgroundGeolocation.onMotionChange(async () => { await executeHeartbeatSync(); });