Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CrossGeolocator iOS Issue: Either just use events or your own delegate #350

Open
SaoryEmanoelle opened this issue Mar 7, 2022 · 3 comments

Comments

@SaoryEmanoelle
Copy link

Hello. I have an app that works perfectly fine on Android but not on iOS. Whenever I call GetPositionAsync, it throws an exception:

I am aware another thread was made in regards to this last year.

#322

However, the version this user was using of Xamarin.Forms is way older than the one I'm using and reverting back to it only causes more issues in my app regarding missing packages. I tried installing 5.0.0.1874 to test it out, but it still throws the exception. I don't know what to do to anymore to solve this.

Version of VS: 16.11.10
Version of Xamarin Forms: 5.0.0.2337

Steps to reproduce the Behavior
Call
Position position = await CrossGeolocator.Current.GetPositionAsync(TimeSpan.FromMilliseconds(10000));
or
Position position = await CrossGeolocator.Current.GetPositionAsync(TimeSpan.FromMilliseconds(10000));

Expected Behavior
Position should return null or position details

Actual Behavior
Throws an exception: Event registration is overwriting existing delegate, Either just use events or your own delegate:Plugin.Geolocator.GeolocationSingle-UpdateDelegateCoreLocation.CLLocationManager+_CLLocationManagerDelegate

@SaoryEmanoelle
Copy link
Author

I've been stuck with this issue since I posted it. Still can't get it to work in these conditions. The only way my app worked was downgrading all packages I needed for this.

In order for it to work, it now has:

Xam.Plugin.Geolocator, version 4.5.0.6
Xamarin.Forms, version 5.0.0.2012
Xamarin Essentials, version 1.6.1
Plugin.Permissions, version 6.0.1

@MongoCaleb
Copy link

I'm getting the same thing in MAUI, and have yet to resolve it.

@irshadka
Copy link

I'm getting the same thing in MAUI, and have yet to resolve it.

Did you get any solution? I am having the same issue.

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

No branches or pull requests

3 participants