I am using this package in android.
When I moved to IOS, the function getLocation() is not responding.
Same here too
Same here as well - just switched to this package and it was working at first but now seems to hang on "getLocation()" even if the permission is granted.
same issue happening here did you guys found a fix??
Same issue for me :/
Facing the same issue!
Same issue as well
Any updates?
My issue was due to the emulator. I needed to go to debug -> location -> Apple (or whatever you wanted).
same here
For anyones with the same issue in Emulator. The solution is as @jeremiahlukus stated, but to expand:
The emulator doesn't provide a location, so you need to configure one predefined or a custom one for the emulator. You can do this, by going into Features > Location > ... and choose either Apple, which will set the location in the Cupertino oficies or any other option, in the menu of the emulator program, at the top of the screen. Not on the settings of the devices.
This will make it work. ;)
I can't get getLocation() to work on the iOS simulator even after setting a custom location
Has anyone found a solution to this? I am explicitly setting a location in the iOS Simulator via Features > Location > Custom Location and everytime I call getLocation() it will silently fail without an error.
Has anyone found a solution to this? I am explicitly setting a location in the iOS Simulator via
Features > Location > Custom Locationand everytime I callgetLocation()it will silently fail without an error.
I encountered same issue. In pubspec.yaml I used ^3.0.0 before, after I updated ^3.1.0, the problem is gone.
I'm having the same issue. getLocation() works on Android, but not iOS. There doesn't seem to be any error thrown either, the Future just never finishes. Updating from 3.0.0 to 3.1.0 didn't help either.
Can confirm this is still an issue even after updating to 3.1.0 @afifahsalimi
Same for
_permissionGranted = await location.requestPermission();
Works like magic on Android
I got it to work.
Checked location permission, and it was set to "Never". Set it to Ask next time.
A potential solution I found was removing this from Info.plist:
<key>EnableBackgroundLocationUpdates</key> <true/>
In my case, the problem was the onLocationChanged stream, when i have an active stream of onLocationChanged, i can't use the function getLocation() because it don't respond.
If i don't activate the getLocation() stream, the function getLocation() works perfectly, this on a physical iPhone with plugin version ^3.1.0.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
In my case, the problem was the onLocationChanged stream, when i have an active stream of onLocationChanged, i can't use the function getLocation() because it don't respond.
If i don't activate the getLocation() stream, the function getLocation() works perfectly, this on a physical iPhone with plugin version ^3.1.0.