Skip to content

fix(ios): added timeout implementation for both getCurrentPosition and watchPosition#55

Merged
OS-ruimoreiramendes merged 29 commits into
nextfrom
fix/RMET-4360/timeout-logic
Nov 4, 2025
Merged

fix(ios): added timeout implementation for both getCurrentPosition and watchPosition#55
OS-ruimoreiramendes merged 29 commits into
nextfrom
fix/RMET-4360/timeout-logic

Conversation

@OS-ruimoreiramendes

Copy link
Copy Markdown
Contributor

Description

This PR adds a new IONGeolocationLib library (version 2.0.0) that includes logic to handle timeouts for both getCurrentPosition and watchPosition.

Context

Type of changes

  • Fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Refactor (cosmetic changes)
  • Breaking change (change that would cause existing functionality to not work as expected)

Platforms affected

  • Android
  • iOS
  • JavaScript

Tests

Test wit Location Sample in ODC

Screenshots (if appropriate)

Checklist

  • Pull request title follows the format RNMT-XXXX <title>
  • Code follows code style of this project
  • CHANGELOG.md file is correctly updated
  • Changes require an update to the documentation
    • Documentation has been updated accordingly

@OS-ruimoreiramendes OS-ruimoreiramendes self-assigned this Oct 29, 2025
@OS-ruimoreiramendes
OS-ruimoreiramendes requested a review from a team October 29, 2025 12:57
@OS-pedrogustavobilro

Copy link
Copy Markdown
Contributor

@OS-ruimoreiramendes per what we talked earlier this should only go with Capacitor 8, in which case we should point this PR to next instead of main

@OS-ruimoreiramendes
OS-ruimoreiramendes changed the base branch from main to next October 29, 2025 16:30
@OS-ruimoreiramendes

OS-ruimoreiramendes commented Oct 29, 2025

Copy link
Copy Markdown
Contributor Author

@OS-ruimoreiramendes per what we talked earlier this should only go with Capacitor 8, in which case we should point this PR to next instead of main

@OS-pedrogustavobilro Already changed the base branch to next and fix the conflicts

Comment thread CHANGELOG.md Outdated
Comment thread packages/capacitor-plugin/ios/Sources/GeolocationPlugin/GeolocationPlugin.swift Outdated
Comment thread packages/capacitor-plugin/ios/Sources/GeolocationPlugin/GeolocationPlugin.swift Outdated

@OS-pedrogustavobilro OS-pedrogustavobilro Oct 29, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: CI is failing on example app build for Android, but I think it could be due to the gradle version being updated on Capacitor Framework. Since this PR doesn't touch Android, I don't think we need to concern ourselves with it here. We'll probably be opening PRs soon to address that. Just wanted to let you know.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Comment thread packages/capacitor-plugin/Package.swift
@OS-ruimoreiramendes OS-ruimoreiramendes changed the title feat(ios): added timeout implementation for both getCurrentPosition and watchPosition fix(ios): added timeout implementation for both getCurrentPosition and watchPosition Oct 30, 2025

@OS-pedrogustavobilro OS-pedrogustavobilro Oct 30, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When testing I'm observing this behavior in the example app in this repo:

  1. I receive a timeout in watchPosition (right now by setting a timeout of 1ms)
  2. I try a get current position with timeout of 1ms. I receive two timeout errors - I believe 1 for this request and one for watch.
  3. I increase the timeout and call get current position. I start receiving locations in the watch.

All this leads me to believe that perhaps there needs to be logic in place to remove the watch callbacks in case of timeout error? Or to generalize the question: Which GeolocationError's are recoverable for a watch and which are not? I think the code assumes right now that all are, and that's not necessarily the case?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, let me take look.
I'll try to replicate it and see if the issue is related to the watch callbacks.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With your change now, I'm having this issue: I have a watch in progress, and I trigger a second one (or a get current position) that times out, it also stops receiving updates for the first one.

This and the previous issue are all tied to the fact that timeouts are not specific to one single watch or location request.

@OS-ruimoreiramendes OS-ruimoreiramendes Oct 31, 2025

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve have figured out the cause in onLocationPermissionGranted()

let shouldRequestCurrentPosition = callbackManager?.locationCallbacks.isEmpty == false
let shouldRequestLocationMonitoring = callbackManager?.watchCallbacks.isEmpty == false

When a watch is already active and a getCurrentPosition is triggered, both flags are true. The current position itself doesn’t time out because we return the last known location from the watch.
However, startMonitoringLocation is also called again due to shouldRequestLocationMonitoring being true, which starts a new timer.

This issue existed before the current changes, so it will not be addressed in this PR.

:path: "../../../../node_modules/.pnpm/@capacitor+ios@8.0.0-alpha.3_@capacitor+core@8.0.0-alpha.3/node_modules/@capacitor/ios"
CapacitorGeolocation:
:path: "../../../capacitor-plugin"
:path: "../../../../node_modules/.pnpm/@capacitor+geolocation@file+packages+capacitor-plugin_@capacitor+core@8.0.0-alpha.3/node_modules/@capacitor/geolocation"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think due to something in pnpm or npm lock files, the example app now instead of depending on the local version, seems to depend on the latest published alpha - This causes npx cap sync to not update the geolocation code Pod for the example app.

I "fixed" on my end it by removing all lock files and node-modules, and sticking to just plain npm install on both plugin and example app.

We should strive for consistency in our repos, use pnpm for all, or npm for all, or at least use one of them for the same repository, not both.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't really need to be addressed in this PR, and only affects the example app, so I'll be approving the PR, no point in dilly-dallying any further xD

@OS-pedrogustavobilro
OS-pedrogustavobilro requested a review from a team October 31, 2025 17:53
@OS-ruimoreiramendes
OS-ruimoreiramendes requested review from a team and removed request for a team November 4, 2025 15:20
@OS-ruimoreiramendes
OS-ruimoreiramendes merged commit 4c22ac3 into next Nov 4, 2025
7 of 8 checks passed
capacitor-bot pushed a commit that referenced this pull request Nov 4, 2025
# [8.0.0-next.4](v8.0.0-next.3...v8.0.0-next.4) (2025-11-04)

### Bug Fixes

* **ios:** added timeout implementation for both getCurrentPosition and watchPosition ([#55](#55)) ([4c22ac3](4c22ac3))
@OS-ruimoreiramendes
OS-ruimoreiramendes deleted the fix/RMET-4360/timeout-logic branch November 4, 2025 15:53
OS-pedrogustavobilro added a commit that referenced this pull request Nov 19, 2025
Because the native Android library now applies the `timeout` explicitly to `addWatch`, we should allow consumers of this plugin to configure interval's to be lower that timeout, while leaving default value of `timeout` for backwards compatibility with versio 7.1.x

We document this as a breaking change, as it has the possibility of causing location timeouts where there previously were none. There was also an equivalent breaking change for iOS, in a previous PR.

References:

- https://outsystemsrd.atlassian.net/browse/RMET-4360
- https://outsystemsrd.atlassian.net/browse/RMET-4688
- #55

BREAKING CHANGE: The `timeout` property now gets applied to all requests on Android on iOS, as opposed to just web and `getCurrentPosition` on Android. This aligns with what is documented in the plugin. If you are experiencing timeouts when requesting location in your app, consider using a higher `timeout` value. For `watchPosition` on Android, you may use the `interval` parameter introduced in version 8.0.0.
capacitor-bot pushed a commit that referenced this pull request Dec 8, 2025
# [8.0.0](v7.1.6...v8.0.0) (2025-12-08)

### Bug Fixes

* **android:** use 'propName = value' assignment syntax in build.gradle files ([08f311a](08f311a))
* **ios:** added timeout implementation for both getCurrentPosition and watchPosition ([#55](#55)) ([4c22ac3](4c22ac3))
* peerDependency for pnpm compatibility ([a94839d](a94839d))

### Features

* **android:** Fallback option for no network or Play Services ([#53](#53)) ([09277b7](09277b7))
* **android:** New parameter `interval` in `watchPosition` ([#62](#62)) ([7fda0cf](7fda0cf))
* Capacitor 8 support ([6ead26a](6ead26a))

### BREAKING CHANGES

* **android:** The `timeout` property now gets applied to all requests on Android on iOS, as opposed to just web and `getCurrentPosition` on Android. This aligns with what is documented in the plugin. If you are experiencing timeouts when requesting location in your app, consider using a higher `timeout` value. For `watchPosition` on Android, you may use the `interval` parameter introduced in version 8.0.0.
* Capacitor major version update requires major version update on the plugin.
github-actions Bot pushed a commit to nitra/capacitor-geolocation that referenced this pull request Jun 20, 2026
# 1.0.0 (2026-06-20)

### Bug Fixes

* add missing callbacks when calling clearWatch ([be9b246](be9b246))
* Add play services location version for capacitor ([15170c2](15170c2))
* add returnType annotation to watchPosition function ([de2b2a5](de2b2a5))
* add success and error callbacks to clearWatch in outsystems-wrapper ([057ee1f](057ee1f))
* add watchId to options before calling watchPosition ([2fefd65](2fefd65))
* **android:** AGP 9.0 no longer supporting `proguard-android.txt` ([ionic-team#74](https://github.com/nitra/capacitor-geolocation/issues/74)) ([32961e1](32961e1))
* **android:** Only request permissions that are defined in the manifest ([ionic-team#85](https://github.com/nitra/capacitor-geolocation/issues/85)) ([c9c4c84](c9c4c84))
* **android:** Properly parsing number parameters ([ionic-team#24](https://github.com/nitra/capacitor-geolocation/issues/24)) ([cb605d8](cb605d8))
* **android:** Properly parsing number parameters ([ionic-team#24](https://github.com/nitra/capacitor-geolocation/issues/24)) ([75ffbd2](75ffbd2))
* **android:** Return error when user rejects request to turn on location with `enableLocationManagerFallback=true` ([ionic-team#86](https://github.com/nitra/capacitor-geolocation/issues/86)) ([1a2504a](1a2504a))
* **android:** update Gradle and Kotlin configurations for compatibility with latest @capacitor/android ([ionic-team#28](https://github.com/nitra/capacitor-geolocation/issues/28)) ([060d525](060d525))
* **android:** use 'propName = value' assignment syntax in build.gradle files ([08f311a](08f311a))
* Capacitor plugin name on sample app ([4b18fc9](4b18fc9))
* Capacitor sample app name ([6d47cd0](6d47cd0))
* Capacitor sample app name and package ([e45a172](e45a172))
* Continue with @capacitor/geolocation ([164aa60](164aa60))
* convert position result for watchPosition like we do for getCurrentPosition ([a1490e8](a1490e8))
* convert position result for watchPosition like we do for getCurrentPosition ([ad8d264](ad8d264))
* coroutine scope lifecycle on cordova plugin ([719f87c](719f87c))
* correct iOS build scheme name in verify script ([48d41aa](48d41aa))
* correctly pass options to clearWatch ([54a138c](54a138c))
* correctly pass watchId to clearWatch ([741d72a](741d72a))
* correctly pass watchId to clearWatch ([6ee6dc8](6ee6dc8))
* directory for os-lib ([80d2eb5](80d2eb5))
* **docs:** improve formatting and clarity in README.md ([c08c8e3](c08c8e3))
* fix directories ([68da3e5](68da3e5))
* fix prefix format for error codes ([f947fa2](f947fa2))
* fix type of success callback ([ff2a4c6](ff2a4c6))
* fixing function name for `watchPosition` and `id field for clearWatch ([351b570](351b570))
* fixing iOS file name ([b3b4026](b3b4026))
* fixing iOS library name in plugin.xml ([eaaee59](eaaee59))
* fixing library name in Azure pipeline ([7bef749](7bef749))
* fixing typo in package ([a450280](a450280))
* include `watchId` in the parameters for `watchPosition in the cordova-plugin ([b39abe4](b39abe4))
* include `watchId` in the parameters for `watchPosition` in the cordova-plugin ([17f308a](17f308a))
* **ios:** added timeout implementation for both getCurrentPosition and watchPosition ([ionic-team#55](https://github.com/nitra/capacitor-geolocation/issues/55)) ([4c22ac3](4c22ac3))
* **ios:** Allow publisher re-subscribe on location error ([8705ea8](8705ea8))
* **ios:** Allow publisher re-subscribe on location error ([960bfc4](960bfc4))
* **ios:** fixes an issue where the plugin stops receiving location updates after calling the clearWatch method ([ionic-team#38](https://github.com/nitra/capacitor-geolocation/issues/38)) ([d6f5266](d6f5266))
* **ios:** handle location watch callbacks recovery after backgrounding ([978bd50](978bd50))
* **ios:** resolving requestPermissions ([ionic-team#16](https://github.com/nitra/capacitor-geolocation/issues/16)) ([2586a9e](2586a9e))
* **ios:** Simplify SPM usage for native library ([ionic-team#52](https://github.com/nitra/capacitor-geolocation/issues/52)) ([ad53dc6](ad53dc6))
* **ios:** watchPosition after an error occurs ([f851818](f851818))
* **ios:** watchPosition after an error occurs ([749ca11](749ca11))
* local variable declarations ([f4b585f](f4b585f))
* make SPM use version 7 instead of main ([ionic-team#18](https://github.com/nitra/capacitor-geolocation/issues/18)) ([9b4a7c6](9b4a7c6))
* make SPM use version 7 instead of main ([ionic-team#18](https://github.com/nitra/capacitor-geolocation/issues/18)) ([d46adec](d46adec))
* match package.json description to match old plugin ([c942731](c942731))
* Missing permissions in android app ([cf5ff7c](cf5ff7c))
* Missing speed prop in sample app ([b30564f](b30564f))
* peerDependency for pnpm compatibility ([a94839d](a94839d))
* Podspec definition for ios plugin ([0e1706c](0e1706c))
* properly get parameters for getCurrentPosition ([4cdef94](4cdef94))
* Re-add License file ([ionic-team#23](https://github.com/nitra/capacitor-geolocation/issues/23)) ([3dd0acf](3dd0acf))
* Re-add License file ([ionic-team#23](https://github.com/nitra/capacitor-geolocation/issues/23)) ([fc287aa](fc287aa))
* remove files that do not exist (yet) ([4fda383](4fda383))
* restore timeout handling and options forwarding from upstream ([04b1ba2](04b1ba2))
* set keepCallback to true when returning position for `watchPosition ([423ccd7](423ccd7))
* set peerDependency on @capacitor/core to `>=7.0.0` to match current version of plugin ([ab7ea49](ab7ea49))
* typos and remove unnecessary callback ([2fcd073](2fcd073))
* Unit tests un-mocking ([3e24815](3e24815))
* Update android and ios OS version targets ([6580cde](6580cde))
* update IONGeolocationLib dependency and improve location handling in GeolocationPlugin ([d3d29b4](d3d29b4))
* update IONGeolocationLib dependency version constraint to allow newer versions ([ab34684](ab34684))
* update location service methods to include options for improved functionality ([488b57d](488b57d))
* update repository URL in package.json and add id-token permission in release workflow ([c2d497e](c2d497e))
* update test gradle dependencies ([551660d](551660d))
* Urls on capacitor plugin's `package.json` ([5e95952](5e95952))
* use `position.altitudeAccuracy ([e35bc43](e35bc43))
* use correct const variable ([324cf12](324cf12))
* use plugin.xml as standard file, not link ([c02588c](c02588c))

### Features

* add altitudeAccuracy to result ([c2a5749](c2a5749))
* add altitudeAccuracy to result ([0a44a66](0a44a66))
* add barebones implementation of Android Capacitor Bridge ([e7146d3](e7146d3))
* add barebones implementation of Android Cordova Bridge ([a7c7a7d](a7c7a7d))
* add cordova and capacitor bridge methods ([43487c5](43487c5))
* add implementation for Capacitor bridge ([6a8f6f4](6a8f6f4))
* add outsystems javascript wrapper for both capacitor and cordova plugins ([fc11136](fc11136))
* add permission request to Cordova bridge ([9c5a05b](9c5a05b))
* add support for heading ([ionic-team#78](https://github.com/nitra/capacitor-geolocation/issues/78)) ([ed20f3e](ed20f3e))
* add wrapper as a package ([2a99be8](2a99be8))
* addWatch+clearWatch for Android cordova bridge ([d6fe8bb](d6fe8bb))
* **android:** Fallback option for no network or Play Services ([ionic-team#53](https://github.com/nitra/capacitor-geolocation/issues/53)) ([09277b7](09277b7))
* **android:** New parameter `interval` in `watchPosition` ([ionic-team#62](https://github.com/nitra/capacitor-geolocation/issues/62)) ([7fda0cf](7fda0cf))
* cap sample app watches and clear watch ([5934095](5934095))
* Capacitor 8 support ([6ead26a](6ead26a))
* **capacitor:** add pwa code ([8340740](8340740))
* **capacitor:** add pwa getCurrentPosition ([02e5c0a](02e5c0a))
* **ci:** add Maven Central publishing workflow and Android publishing scripts ([ionic-team#72](https://github.com/nitra/capacitor-geolocation/issues/72)) ([281d64f](281d64f))
* **ci:** add publish-pod job to invoke CocoaPods publish workflow ([ionic-team#70](https://github.com/nitra/capacitor-geolocation/issues/70)) ([e2387f4](e2387f4))
* **ci:** add publish-pod job to invoke CocoaPods publish workflow ([ionic-team#71](https://github.com/nitra/capacitor-geolocation/issues/71)) ([f9a4eca](f9a4eca))
* configura Kotlin version for Capacitor Plugin ([48b0cc2](48b0cc2))
* convert JSON result for format needed for Capacitor bridge ([8a36084](8a36084))
* enhance location string representation with isMock and provider details ([4ae9d54](4ae9d54))
* finish getLocation implementation on library ([6637f74](6637f74))
* first implementation of `getLocation ([abb24a7](abb24a7))
* get watchId from args ([3b72a49](3b72a49))
* implement addWatch and clearWatch on Capacitor bridge ([a5a2ebf](a5a2ebf))
* Implement addWatch+clearWatch for native Android ([1d4d426](1d4d426))
* Initial location example app code ([3363e74](3363e74))
* initial version for sample app watches ([a829efb](a829efb))
* properly handle error scenarios in Capacitor bridge and remove unused sealed class ([fe28149](fe28149))
* properly handle error scenarios in Cordova bridge ([1da1205](1da1205))
* request permissions before getting location ([fe32351](fe32351))
* update dependency to OSGeolocationLib-Android in Cordova and Capacitor plugin, and remove local Android lib ([bb9b86d](bb9b86d))
* Update plugin name ([9948a41](9948a41))

### BREAKING CHANGES

* **android:** The `timeout` property now gets applied to all requests on Android on iOS, as opposed to just web and `getCurrentPosition` on Android. This aligns with what is documented in the plugin. If you are experiencing timeouts when requesting location in your app, consider using a higher `timeout` value. For `watchPosition` on Android, you may use the `interval` parameter introduced in version 8.0.0.
* Capacitor major version update requires major version update on the plugin.
github-actions Bot pushed a commit to nitra/capacitor-geolocation that referenced this pull request Jun 23, 2026
# 1.0.0 (2026-06-23)

### Bug Fixes

* add missing callbacks when calling clearWatch ([be9b246](be9b246))
* Add play services location version for capacitor ([15170c2](15170c2))
* add returnType annotation to watchPosition function ([de2b2a5](de2b2a5))
* add success and error callbacks to clearWatch in outsystems-wrapper ([057ee1f](057ee1f))
* add watchId to options before calling watchPosition ([2fefd65](2fefd65))
* **android:** AGP 9.0 no longer supporting `proguard-android.txt` ([ionic-team#74](https://github.com/nitra/capacitor-geolocation/issues/74)) ([32961e1](32961e1))
* **android:** Only request permissions that are defined in the manifest ([ionic-team#85](https://github.com/nitra/capacitor-geolocation/issues/85)) ([c9c4c84](c9c4c84))
* **android:** Properly parsing number parameters ([ionic-team#24](https://github.com/nitra/capacitor-geolocation/issues/24)) ([cb605d8](cb605d8))
* **android:** Properly parsing number parameters ([ionic-team#24](https://github.com/nitra/capacitor-geolocation/issues/24)) ([75ffbd2](75ffbd2))
* **android:** Return error when user rejects request to turn on location with `enableLocationManagerFallback=true` ([ionic-team#86](https://github.com/nitra/capacitor-geolocation/issues/86)) ([1a2504a](1a2504a))
* **android:** update Gradle and Kotlin configurations for compatibility with latest @capacitor/android ([ionic-team#28](https://github.com/nitra/capacitor-geolocation/issues/28)) ([060d525](060d525))
* **android:** use 'propName = value' assignment syntax in build.gradle files ([08f311a](08f311a))
* Capacitor plugin name on sample app ([4b18fc9](4b18fc9))
* Capacitor sample app name ([6d47cd0](6d47cd0))
* Capacitor sample app name and package ([e45a172](e45a172))
* Continue with @capacitor/geolocation ([164aa60](164aa60))
* convert position result for watchPosition like we do for getCurrentPosition ([a1490e8](a1490e8))
* convert position result for watchPosition like we do for getCurrentPosition ([ad8d264](ad8d264))
* coroutine scope lifecycle on cordova plugin ([719f87c](719f87c))
* correct iOS build scheme name in verify script ([48d41aa](48d41aa))
* correctly pass options to clearWatch ([54a138c](54a138c))
* correctly pass watchId to clearWatch ([741d72a](741d72a))
* correctly pass watchId to clearWatch ([6ee6dc8](6ee6dc8))
* directory for os-lib ([80d2eb5](80d2eb5))
* **docs:** improve formatting and clarity in README.md ([c08c8e3](c08c8e3))
* fix directories ([68da3e5](68da3e5))
* fix prefix format for error codes ([f947fa2](f947fa2))
* fix type of success callback ([ff2a4c6](ff2a4c6))
* fixing function name for `watchPosition` and `id field for clearWatch ([351b570](351b570))
* fixing iOS file name ([b3b4026](b3b4026))
* fixing iOS library name in plugin.xml ([eaaee59](eaaee59))
* fixing library name in Azure pipeline ([7bef749](7bef749))
* fixing typo in package ([a450280](a450280))
* include `watchId` in the parameters for `watchPosition in the cordova-plugin ([b39abe4](b39abe4))
* include `watchId` in the parameters for `watchPosition` in the cordova-plugin ([17f308a](17f308a))
* **ios:** added timeout implementation for both getCurrentPosition and watchPosition ([ionic-team#55](https://github.com/nitra/capacitor-geolocation/issues/55)) ([4c22ac3](4c22ac3))
* **ios:** Allow publisher re-subscribe on location error ([8705ea8](8705ea8))
* **ios:** Allow publisher re-subscribe on location error ([960bfc4](960bfc4))
* **ios:** atlas-pro[#7380](https://github.com/nitra/capacitor-geolocation/issues/7380) rename SPM package to NitraGeolocation ([a1049ca](a1049ca))
* **ios:** fixes an issue where the plugin stops receiving location updates after calling the clearWatch method ([ionic-team#38](https://github.com/nitra/capacitor-geolocation/issues/38)) ([d6f5266](d6f5266))
* **ios:** handle location watch callbacks recovery after backgrounding ([978bd50](978bd50))
* **ios:** resolving requestPermissions ([ionic-team#16](https://github.com/nitra/capacitor-geolocation/issues/16)) ([2586a9e](2586a9e))
* **ios:** Simplify SPM usage for native library ([ionic-team#52](https://github.com/nitra/capacitor-geolocation/issues/52)) ([ad53dc6](ad53dc6))
* **ios:** watchPosition after an error occurs ([f851818](f851818))
* **ios:** watchPosition after an error occurs ([749ca11](749ca11))
* local variable declarations ([f4b585f](f4b585f))
* make SPM use version 7 instead of main ([ionic-team#18](https://github.com/nitra/capacitor-geolocation/issues/18)) ([9b4a7c6](9b4a7c6))
* make SPM use version 7 instead of main ([ionic-team#18](https://github.com/nitra/capacitor-geolocation/issues/18)) ([d46adec](d46adec))
* match package.json description to match old plugin ([c942731](c942731))
* Missing permissions in android app ([cf5ff7c](cf5ff7c))
* Missing speed prop in sample app ([b30564f](b30564f))
* peerDependency for pnpm compatibility ([a94839d](a94839d))
* Podspec definition for ios plugin ([0e1706c](0e1706c))
* properly get parameters for getCurrentPosition ([4cdef94](4cdef94))
* Re-add License file ([ionic-team#23](https://github.com/nitra/capacitor-geolocation/issues/23)) ([3dd0acf](3dd0acf))
* Re-add License file ([ionic-team#23](https://github.com/nitra/capacitor-geolocation/issues/23)) ([fc287aa](fc287aa))
* remove files that do not exist (yet) ([4fda383](4fda383))
* restore timeout handling and options forwarding from upstream ([04b1ba2](04b1ba2))
* set keepCallback to true when returning position for `watchPosition ([423ccd7](423ccd7))
* set peerDependency on @capacitor/core to `>=7.0.0` to match current version of plugin ([ab7ea49](ab7ea49))
* typos and remove unnecessary callback ([2fcd073](2fcd073))
* Unit tests un-mocking ([3e24815](3e24815))
* Update android and ios OS version targets ([6580cde](6580cde))
* update IONGeolocationLib dependency and improve location handling in GeolocationPlugin ([d3d29b4](d3d29b4))
* update IONGeolocationLib dependency version constraint to allow newer versions ([ab34684](ab34684))
* update location service methods to include options for improved functionality ([488b57d](488b57d))
* update repository URL in package.json and add id-token permission in release workflow ([c2d497e](c2d497e))
* update test gradle dependencies ([551660d](551660d))
* Urls on capacitor plugin's `package.json` ([5e95952](5e95952))
* use `position.altitudeAccuracy ([e35bc43](e35bc43))
* use correct const variable ([324cf12](324cf12))
* use plugin.xml as standard file, not link ([c02588c](c02588c))

### Features

* add altitudeAccuracy to result ([c2a5749](c2a5749))
* add altitudeAccuracy to result ([0a44a66](0a44a66))
* add barebones implementation of Android Capacitor Bridge ([e7146d3](e7146d3))
* add barebones implementation of Android Cordova Bridge ([a7c7a7d](a7c7a7d))
* add cordova and capacitor bridge methods ([43487c5](43487c5))
* add implementation for Capacitor bridge ([6a8f6f4](6a8f6f4))
* add outsystems javascript wrapper for both capacitor and cordova plugins ([fc11136](fc11136))
* add permission request to Cordova bridge ([9c5a05b](9c5a05b))
* add support for heading ([ionic-team#78](https://github.com/nitra/capacitor-geolocation/issues/78)) ([ed20f3e](ed20f3e))
* add wrapper as a package ([2a99be8](2a99be8))
* addWatch+clearWatch for Android cordova bridge ([d6fe8bb](d6fe8bb))
* **android:** Fallback option for no network or Play Services ([ionic-team#53](https://github.com/nitra/capacitor-geolocation/issues/53)) ([09277b7](09277b7))
* **android:** New parameter `interval` in `watchPosition` ([ionic-team#62](https://github.com/nitra/capacitor-geolocation/issues/62)) ([7fda0cf](7fda0cf))
* cap sample app watches and clear watch ([5934095](5934095))
* Capacitor 8 support ([6ead26a](6ead26a))
* **capacitor:** add pwa code ([8340740](8340740))
* **capacitor:** add pwa getCurrentPosition ([02e5c0a](02e5c0a))
* **ci:** add Maven Central publishing workflow and Android publishing scripts ([ionic-team#72](https://github.com/nitra/capacitor-geolocation/issues/72)) ([281d64f](281d64f))
* **ci:** add publish-pod job to invoke CocoaPods publish workflow ([ionic-team#70](https://github.com/nitra/capacitor-geolocation/issues/70)) ([e2387f4](e2387f4))
* **ci:** add publish-pod job to invoke CocoaPods publish workflow ([ionic-team#71](https://github.com/nitra/capacitor-geolocation/issues/71)) ([f9a4eca](f9a4eca))
* configura Kotlin version for Capacitor Plugin ([48b0cc2](48b0cc2))
* convert JSON result for format needed for Capacitor bridge ([8a36084](8a36084))
* enhance location string representation with isMock and provider details ([4ae9d54](4ae9d54))
* finish getLocation implementation on library ([6637f74](6637f74))
* first implementation of `getLocation ([abb24a7](abb24a7))
* get watchId from args ([3b72a49](3b72a49))
* implement addWatch and clearWatch on Capacitor bridge ([a5a2ebf](a5a2ebf))
* Implement addWatch+clearWatch for native Android ([1d4d426](1d4d426))
* Initial location example app code ([3363e74](3363e74))
* initial version for sample app watches ([a829efb](a829efb))
* properly handle error scenarios in Capacitor bridge and remove unused sealed class ([fe28149](fe28149))
* properly handle error scenarios in Cordova bridge ([1da1205](1da1205))
* request permissions before getting location ([fe32351](fe32351))
* update dependency to OSGeolocationLib-Android in Cordova and Capacitor plugin, and remove local Android lib ([bb9b86d](bb9b86d))
* Update plugin name ([9948a41](9948a41))

### BREAKING CHANGES

* **android:** The `timeout` property now gets applied to all requests on Android on iOS, as opposed to just web and `getCurrentPosition` on Android. This aligns with what is documented in the plugin. If you are experiencing timeouts when requesting location in your app, consider using a higher `timeout` value. For `watchPosition` on Android, you may use the `interval` parameter introduced in version 8.0.0.
* Capacitor major version update requires major version update on the plugin.
github-actions Bot pushed a commit to nitra/capacitor-geolocation that referenced this pull request Jun 23, 2026
# 1.0.0 (2026-06-23)

### Bug Fixes

* add missing callbacks when calling clearWatch ([be9b246](be9b246))
* Add play services location version for capacitor ([15170c2](15170c2))
* add returnType annotation to watchPosition function ([de2b2a5](de2b2a5))
* add success and error callbacks to clearWatch in outsystems-wrapper ([057ee1f](057ee1f))
* add watchId to options before calling watchPosition ([2fefd65](2fefd65))
* **android:** AGP 9.0 no longer supporting `proguard-android.txt` ([ionic-team#74](https://github.com/nitra/capacitor-geolocation/issues/74)) ([32961e1](32961e1))
* **android:** Only request permissions that are defined in the manifest ([ionic-team#85](https://github.com/nitra/capacitor-geolocation/issues/85)) ([c9c4c84](c9c4c84))
* **android:** Properly parsing number parameters ([ionic-team#24](https://github.com/nitra/capacitor-geolocation/issues/24)) ([cb605d8](cb605d8))
* **android:** Properly parsing number parameters ([ionic-team#24](https://github.com/nitra/capacitor-geolocation/issues/24)) ([75ffbd2](75ffbd2))
* **android:** Return error when user rejects request to turn on location with `enableLocationManagerFallback=true` ([ionic-team#86](https://github.com/nitra/capacitor-geolocation/issues/86)) ([1a2504a](1a2504a))
* **android:** update Gradle and Kotlin configurations for compatibility with latest @capacitor/android ([ionic-team#28](https://github.com/nitra/capacitor-geolocation/issues/28)) ([060d525](060d525))
* **android:** use 'propName = value' assignment syntax in build.gradle files ([08f311a](08f311a))
* Capacitor plugin name on sample app ([4b18fc9](4b18fc9))
* Capacitor sample app name ([6d47cd0](6d47cd0))
* Capacitor sample app name and package ([e45a172](e45a172))
* Continue with @capacitor/geolocation ([164aa60](164aa60))
* convert position result for watchPosition like we do for getCurrentPosition ([a1490e8](a1490e8))
* convert position result for watchPosition like we do for getCurrentPosition ([ad8d264](ad8d264))
* coroutine scope lifecycle on cordova plugin ([719f87c](719f87c))
* correct iOS build scheme name in verify script ([48d41aa](48d41aa))
* correctly pass options to clearWatch ([54a138c](54a138c))
* correctly pass watchId to clearWatch ([741d72a](741d72a))
* correctly pass watchId to clearWatch ([6ee6dc8](6ee6dc8))
* directory for os-lib ([80d2eb5](80d2eb5))
* **docs:** improve formatting and clarity in README.md ([c08c8e3](c08c8e3))
* fix directories ([68da3e5](68da3e5))
* fix prefix format for error codes ([f947fa2](f947fa2))
* fix type of success callback ([ff2a4c6](ff2a4c6))
* fixing function name for `watchPosition` and `id field for clearWatch ([351b570](351b570))
* fixing iOS file name ([b3b4026](b3b4026))
* fixing iOS library name in plugin.xml ([eaaee59](eaaee59))
* fixing library name in Azure pipeline ([7bef749](7bef749))
* fixing typo in package ([a450280](a450280))
* include `watchId` in the parameters for `watchPosition in the cordova-plugin ([b39abe4](b39abe4))
* include `watchId` in the parameters for `watchPosition` in the cordova-plugin ([17f308a](17f308a))
* **ios:** added timeout implementation for both getCurrentPosition and watchPosition ([ionic-team#55](https://github.com/nitra/capacitor-geolocation/issues/55)) ([4c22ac3](4c22ac3))
* **ios:** Allow publisher re-subscribe on location error ([8705ea8](8705ea8))
* **ios:** Allow publisher re-subscribe on location error ([960bfc4](960bfc4))
* **ios:** atlas-pro[#7380](https://github.com/nitra/capacitor-geolocation/issues/7380) rename SPM package to NitraGeolocation ([a1049ca](a1049ca))
* **ios:** fixes an issue where the plugin stops receiving location updates after calling the clearWatch method ([ionic-team#38](https://github.com/nitra/capacitor-geolocation/issues/38)) ([d6f5266](d6f5266))
* **ios:** handle location watch callbacks recovery after backgrounding ([978bd50](978bd50))
* **ios:** resolving requestPermissions ([ionic-team#16](https://github.com/nitra/capacitor-geolocation/issues/16)) ([2586a9e](2586a9e))
* **ios:** Simplify SPM usage for native library ([ionic-team#52](https://github.com/nitra/capacitor-geolocation/issues/52)) ([ad53dc6](ad53dc6))
* **ios:** watchPosition after an error occurs ([f851818](f851818))
* **ios:** watchPosition after an error occurs ([749ca11](749ca11))
* local variable declarations ([f4b585f](f4b585f))
* make SPM use version 7 instead of main ([ionic-team#18](https://github.com/nitra/capacitor-geolocation/issues/18)) ([9b4a7c6](9b4a7c6))
* make SPM use version 7 instead of main ([ionic-team#18](https://github.com/nitra/capacitor-geolocation/issues/18)) ([d46adec](d46adec))
* match package.json description to match old plugin ([c942731](c942731))
* Missing permissions in android app ([cf5ff7c](cf5ff7c))
* Missing speed prop in sample app ([b30564f](b30564f))
* peerDependency for pnpm compatibility ([a94839d](a94839d))
* Podspec definition for ios plugin ([0e1706c](0e1706c))
* properly get parameters for getCurrentPosition ([4cdef94](4cdef94))
* Re-add License file ([ionic-team#23](https://github.com/nitra/capacitor-geolocation/issues/23)) ([3dd0acf](3dd0acf))
* Re-add License file ([ionic-team#23](https://github.com/nitra/capacitor-geolocation/issues/23)) ([fc287aa](fc287aa))
* remove files that do not exist (yet) ([4fda383](4fda383))
* restore timeout handling and options forwarding from upstream ([04b1ba2](04b1ba2))
* set keepCallback to true when returning position for `watchPosition ([423ccd7](423ccd7))
* set peerDependency on @capacitor/core to `>=7.0.0` to match current version of plugin ([ab7ea49](ab7ea49))
* typos and remove unnecessary callback ([2fcd073](2fcd073))
* Unit tests un-mocking ([3e24815](3e24815))
* Update android and ios OS version targets ([6580cde](6580cde))
* update IONGeolocationLib dependency and improve location handling in GeolocationPlugin ([d3d29b4](d3d29b4))
* update IONGeolocationLib dependency version constraint to allow newer versions ([ab34684](ab34684))
* update location service methods to include options for improved functionality ([488b57d](488b57d))
* update repository URL in package.json and add id-token permission in release workflow ([c2d497e](c2d497e))
* update test gradle dependencies ([551660d](551660d))
* Urls on capacitor plugin's `package.json` ([5e95952](5e95952))
* use `position.altitudeAccuracy ([e35bc43](e35bc43))
* use correct const variable ([324cf12](324cf12))
* use plugin.xml as standard file, not link ([c02588c](c02588c))

### Features

* add altitudeAccuracy to result ([c2a5749](c2a5749))
* add altitudeAccuracy to result ([0a44a66](0a44a66))
* add barebones implementation of Android Capacitor Bridge ([e7146d3](e7146d3))
* add barebones implementation of Android Cordova Bridge ([a7c7a7d](a7c7a7d))
* add cordova and capacitor bridge methods ([43487c5](43487c5))
* add implementation for Capacitor bridge ([6a8f6f4](6a8f6f4))
* add outsystems javascript wrapper for both capacitor and cordova plugins ([fc11136](fc11136))
* add permission request to Cordova bridge ([9c5a05b](9c5a05b))
* add support for heading ([ionic-team#78](https://github.com/nitra/capacitor-geolocation/issues/78)) ([ed20f3e](ed20f3e))
* add wrapper as a package ([2a99be8](2a99be8))
* addWatch+clearWatch for Android cordova bridge ([d6fe8bb](d6fe8bb))
* **android:** Fallback option for no network or Play Services ([ionic-team#53](https://github.com/nitra/capacitor-geolocation/issues/53)) ([09277b7](09277b7))
* **android:** New parameter `interval` in `watchPosition` ([ionic-team#62](https://github.com/nitra/capacitor-geolocation/issues/62)) ([7fda0cf](7fda0cf))
* cap sample app watches and clear watch ([5934095](5934095))
* Capacitor 8 support ([6ead26a](6ead26a))
* **capacitor:** add pwa code ([8340740](8340740))
* **capacitor:** add pwa getCurrentPosition ([02e5c0a](02e5c0a))
* **ci:** add Maven Central publishing workflow and Android publishing scripts ([ionic-team#72](https://github.com/nitra/capacitor-geolocation/issues/72)) ([281d64f](281d64f))
* **ci:** add publish-pod job to invoke CocoaPods publish workflow ([ionic-team#70](https://github.com/nitra/capacitor-geolocation/issues/70)) ([e2387f4](e2387f4))
* **ci:** add publish-pod job to invoke CocoaPods publish workflow ([ionic-team#71](https://github.com/nitra/capacitor-geolocation/issues/71)) ([f9a4eca](f9a4eca))
* configura Kotlin version for Capacitor Plugin ([48b0cc2](48b0cc2))
* convert JSON result for format needed for Capacitor bridge ([8a36084](8a36084))
* enhance location string representation with isMock and provider details ([4ae9d54](4ae9d54))
* finish getLocation implementation on library ([6637f74](6637f74))
* first implementation of `getLocation ([abb24a7](abb24a7))
* get watchId from args ([3b72a49](3b72a49))
* implement addWatch and clearWatch on Capacitor bridge ([a5a2ebf](a5a2ebf))
* Implement addWatch+clearWatch for native Android ([1d4d426](1d4d426))
* Initial location example app code ([3363e74](3363e74))
* initial version for sample app watches ([a829efb](a829efb))
* properly handle error scenarios in Capacitor bridge and remove unused sealed class ([fe28149](fe28149))
* properly handle error scenarios in Cordova bridge ([1da1205](1da1205))
* request permissions before getting location ([fe32351](fe32351))
* update dependency to OSGeolocationLib-Android in Cordova and Capacitor plugin, and remove local Android lib ([bb9b86d](bb9b86d))
* Update plugin name ([9948a41](9948a41))

### BREAKING CHANGES

* **android:** The `timeout` property now gets applied to all requests on Android on iOS, as opposed to just web and `getCurrentPosition` on Android. This aligns with what is documented in the plugin. If you are experiencing timeouts when requesting location in your app, consider using a higher `timeout` value. For `watchPosition` on Android, you may use the `interval` parameter introduced in version 8.0.0.
* Capacitor major version update requires major version update on the plugin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants