plugins-workspace icon indicating copy to clipboard operation
plugins-workspace copied to clipboard

Tauri Plugin Geolocation Lacks Background Watch (iOS) (Guidance Requested on API and Merge)

Open bradleat opened this issue 1 year ago • 5 comments

Title says it all here. The existing geo location plugin does not update in the background on iOS (I do not know about Android).

I've made an update to the plugin so that background locations work and I have been using it in my own projects. I'd like to contribute the change back to the group, but I'd like feedback on the API and the implementation before I do.

https://github.com/inKibra/tauri-plugins/blob/main/packages/tauri-plugin-geolocation/index.ts

https://github.com/inKibra/tauri-plugins/blob/main/packages/tauri-plugin-geolocation/ios/Sources/GeolocationPlugin.swift

bradleat avatar Sep 23 '24 23:09 bradleat

The only big issue with your current implementation i see is that imo it'd be better to be have a background option in both the requestPermission and the watchPosition apis so that having permissions for background updates won't force background updates.

Other than that i think there's nothing blocking a PR (things like argument naming are imo small enough to discuss while seeing the diff)

FabianLars avatar Sep 24 '24 15:09 FabianLars

That makes sense. I'll work on a PR tomorrow.

bradleat avatar Sep 26 '24 01:09 bradleat

Thanks! Just a warning upfront, i'll be out of office until friday next week so it may take a while for us to work with you towards merging it.

FabianLars avatar Sep 26 '24 10:09 FabianLars

I'll work on it next Tuesday then.

bradleat avatar Sep 27 '24 04:09 bradleat

@FabianLars I opened a PR with the changes. Not sure if that's the right process here. But just wanted comments.

bradleat avatar Oct 05 '24 22:10 bradleat

What is the progress on this feature

BoredTape avatar Feb 20 '25 02:02 BoredTape