flutter-geolocator
flutter-geolocator copied to clipboard
iOS does not return location on first boot
🐛 Bug Report
on iOS a location request does not return a location, freezes instead. Works fine on android or after a reboot. Yes, I can just reboot on iOS but the apple developers see the app as 'non working' now. Same issue with location package.
All keys are present.
Expected behavior
Returning a location
Reproduction steps
See default package example.
Configuration
Version: 1.x
Platform:
- [ x] :iphone: iOS
- [ ] :robot: Android
Any news on this?
I also tried adding a delay inbetween the permission request and actually getting the location. None of it works
https://github.com/Baseflow/flutter-geolocator/blob/726f928ac7662f417c69bb1958e4456afd173929/geolocator_platform_interface/lib/src/implementations/method_channel_geolocator.dart#L122
It freezes at this line, with no response/error whatsoever.
- Location permission is set to "While using the app"
- "Precise location" is on
- iOS version : 15.2
This seems happen to me only with a fresh install. But yes I am seeing this also.
This seems happen to me only with a fresh install. But yes I am seeing this also.
Try to catch PlatformException
Any updates on this issue?
Dear @InstantlyMoist,
In order to be able to reproduce this issue could you please add the output of flutter doctor -v to this issue? And some minimal reproducible code? Could you also inform us a bit about your testing environment?
Kind regards,
Hi @InstantlyMoist,
We think this issue should be solved with version 2.2.6 of the geolocator_apple package. Please run flutter pub upgrade to get the latest version.
I will close this issue for now, please let us know if you still experience this problem and make sure to supply the output of:
- the
flutter doctor -vcommand - the versions used in your application (extract of
pubspec.lockwould help a lot).