capacitor-community / background-geolocation

A Capacitor plugin that sends you geolocation updates, even while the app is in the background.
MIT License
177 stars 54 forks source link

Write locations to file #81

Open HarelM opened 1 year ago

HarelM commented 1 year ago

Resolves #80 This is still not complete as I need to support iOS and I'm very new to swift. Any help there would be greatly appreciated. Also I'm not sure how to pass the file path there into the location update method so again, help would be appreciated. I didn't want to add file plugin to the example, but I tested this code to work with my app basically.

Let me know how you want to proceed with this.

HarelM commented 1 year ago

I've also explored the ability to use a rotating log file in order to make sure this doesn't explode in terms of disk space and it works nicely. I still don't have a solution for iOS though... Let me which direction seems better to you.

diachedelic commented 1 year ago

I would leave it to the application to manage the log file, which might include log rotation. It's too much complexity to add to the plugin.

Also I'm not sure how to pass the file path there into the location update method

I'm not sure what you mean by this. What is the problem?

HarelM commented 1 year ago

I'm not sure how to pass the log file path to the relevant method in iOS. Seems weird to me how the flow of data is done in swift (mainly because I don't know swift I guess)...