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") {
|
if (Platform.OS === "android") {
|
||||||
BackgroundGeolocation.registerHeadlessTask(HeadlessTask);
|
BackgroundGeolocation.registerHeadlessTask(HeadlessTask);
|
||||||
} else if (Platform.OS === "ios") {
|
} else if (Platform.OS === "ios") {
|
||||||
BackgroundGeolocation.onLocation(async (_location) => {
|
BackgroundGeolocation.onLocation(async () => {
|
||||||
|
await executeHeartbeatSync();
|
||||||
|
});
|
||||||
|
|
||||||
|
BackgroundGeolocation.onMotionChange(async () => {
|
||||||
await executeHeartbeatSync();
|
await executeHeartbeatSync();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue