flutter-geolocator icon indicating copy to clipboard operation
flutter-geolocator copied to clipboard

iOS does not return location on first boot

Open InstantlyMoist opened this issue 3 years ago • 4 comments

🐛 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

InstantlyMoist avatar Jan 19 '22 17:01 InstantlyMoist

Any news on this?

I also tried adding a delay inbetween the permission request and actually getting the location. None of it works

InstantlyMoist avatar Jan 22 '22 08:01 InstantlyMoist

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

UsamaKarim avatar Feb 08 '22 04:02 UsamaKarim

This seems happen to me only with a fresh install. But yes I am seeing this also.

scotch-formitable avatar Mar 16 '22 15:03 scotch-formitable

This seems happen to me only with a fresh install. But yes I am seeing this also.

Try to catch PlatformException

UsamaKarim avatar Mar 18 '22 10:03 UsamaKarim

Any updates on this issue?

JulianBissekkou avatar Dec 16 '22 10:12 JulianBissekkou

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,

TimHoogstrate avatar Aug 03 '23 09:08 TimHoogstrate

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:

  1. the flutter doctor -v command
  2. the versions used in your application (extract of pubspec.lock would help a lot).

mvanbeusekom avatar Aug 07 '23 08:08 mvanbeusekom