fix(ios-headless): wip
This commit is contained in:
parent
71c31eefc7
commit
6f628979c6
1 changed files with 5 additions and 1 deletions
6
index.js
6
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();
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue