Replace @react-native-community/geolocation with expo-location#73757
Conversation
|
|
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
Are we OK to merge this before the Mobile-Expensify PR is merged? |
|
The QA is not fully done yet, I am creating a new build here and they will run through the last few cases there https://expensify.slack.com/archives/C9YU7BX5M/p1764768065649599?thread_ts=1764005101.693779&cid=C9YU7BX5M |
|
🚧 @mountiny has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
@GCyganek @AndrewGable the qa is done here, only one issue found |
Could you elaborate what's the issue so I can take a look and fix it? |
|
Hmmm this one should be fixed already, @jponikarchuk could you confirm? |
|
@GCyganek This issue is not reproducible now |
| }; | ||
|
|
||
| type GeolocationOptions = { | ||
| /** Desktop only */ |
There was a problem hiding this comment.
We don't have desktop anymore, so maybe this is web only?
There was a problem hiding this comment.
Otherwise, let's remove
There was a problem hiding this comment.
Yes this is desktop only, so I should've removed it, but I missed it, thank you!
There was a problem hiding this comment.
I have also moved locationPermission.ts file content to desktop/main.ts as it was only used there to not miss deleting it when desktop/main.ts is removed
There was a problem hiding this comment.
But there should be no change in how things work as I only removed desktop related code
|
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/AndrewGable in version: 9.2.78-0 🚀
|
|
🚀 Deployed to production by https://github.com/AndrewGable in version: 9.2.78-8 🚀
|
|
@GCyganek Have you ever faced this error? How to fix it? I am trying to build HybridApp. |
It looks like it's trying to import |
| let message = 'Geolocation call failed'; | ||
| let code = GeolocationErrorCode.POSITION_UNAVAILABLE; | ||
|
|
||
| if (caughtError instanceof GeolocationPositionError) { |
Explanation of Change
With
expo-locationand desktop deprecation we now have only one implementation for both native and webgetCurrentPosition's API is similar to https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition as it was until now to keep the usages without changes. #74328Usages of
getCurrentPositionare in:Fixed Issues
$ #73531 (comment)
PROPOSAL:
MOBILE-EXPENSIFY: https://github.com/Expensify/Mobile-Expensify/pull/13763
Tests
AddressSearch:
StartUse current locationand verify that it works correctlyMapView & MapViewImpl:
IOURequestStepConfirmation:
Make sure location was never asked for on your account, otherwise it will skip the location request and use the saved one
You can use this one that I was using for testing:

IOURequestStepScan:
Make sure location permission is granted on your device for the app/web page
FAB > Create expense > Scanand submit an expense to yourself (selfDM - requires an account withTrack and budget expenseschosen forWhat do you want to do today?onboarding step)Scan receiptand add another expense usingScanthat has only amount specified without a currencySubmitDetailsPage:
Sharefunctionality and chooseExpensifySubmitand choose a contactCreate expenseand approve location request, it should set the currency of the expense based on your location after scanning endsOffline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
SubmitDetailsPage:
Screen.Recording.2025-11-04.at.12.16.44.mov
AddressSearch & MapView:
Screen.Recording.2025-11-04.at.12.21.51.mov
IOURequestStepConfirmation (location was set to US and location permission was granted to the app before):
Screen.Recording.2025-11-04.at.12.25.43.mov
IOURequestStepScan:
Screen.Recording.2025-11-04.at.14.00.27.mov
Android: mWeb Chrome
iOS: Native
AddressSearch & MapView:
Screen.Recording.2025-11-04.at.14.41.00.mov
SubmitDetailsPage:
Screen.Recording.2025-11-04.at.11.43.36.mov
IOURequestStepScan:
Screen.Recording.2025-11-04.at.15.27.12.mov
IOURequestStepConfirmation:
Screen.Recording.2025-11-04.at.15.26.31.mov
iOS: mWeb Safari
MacOS: Chrome / Safari
AddressSearch & MapView & MapViewImpl:
Screen.Recording.2025-11-03.at.17.50.01.mov
IOURequestStepConfirmation:
Screen.Recording.2025-11-03.at.18.25.28.mov
IOURequestStepScan:
Screen.Recording.2025-11-04.at.15.18.01.mov