diff --git a/android/build.gradle b/android/build.gradle index ea31b01..a738ab3 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -81,7 +81,7 @@ dependencies { implementation project(':capacitor-android') } - implementation("io.ionic.libs:iongeolocation-android:2.2.1") + implementation("io.ionic.libs:iongeolocation-android:2.2.2") implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion" implementation 'com.google.code.gson:gson:2.13.2' diff --git a/ios/Sources/GeolocationPlugin/GeolocationPlugin.swift b/ios/Sources/GeolocationPlugin/GeolocationPlugin.swift index d63c244..0716144 100644 --- a/ios/Sources/GeolocationPlugin/GeolocationPlugin.swift +++ b/ios/Sources/GeolocationPlugin/GeolocationPlugin.swift @@ -150,6 +150,9 @@ private extension GeolocationPlugin { locationCancellable = locationService?.currentLocationPublisher .catch { [weak self] error -> AnyPublisher in print("An error was found while retrieving the location: \(error)") + // A failure terminates this subscription; re-bind or later callbacks are dropped. RMET-5383 + self?.locationInitialized = false + self?.bindLocationPublisher() if case IONGLOCLocationError.locationUnavailable = error { print("Location unavailable (likely due to backgrounding). Keeping watch callbacks alive.")