GeolocatorPlugin icon indicating copy to clipboard operation
GeolocatorPlugin copied to clipboard

Event registration is overwriting existing delegate on iOS

Open FIELDPOINT opened this issue 4 years ago • 4 comments

Calling Position posPosition = await CrossGeolocator.Current.GetPositionAsync(TimeSpan.FromSeconds(5), null, true);

throws this error

Event registration is overwriting existing delegate. Either just use events or your own delegate: Plugin.Geolocator.GeolocationSingleUpdateDelegate CoreLocation.CLLocationManager+_CLLocationManagerDelegate

Does not happen if I keep everything same and revert back to 4.5.3 Beta. And does not happen on Android even with the 4.6.2 Beta.

Version Number of Plugin: Device Tested On: 4.6.2 Beta Simulator Tested On: Version of VS: 16.4.4 Version of Xamarin: 4.5.0.356 Versions of other things you are using:

Steps to reproduce the Behavior

Just call

Position posPosition = await CrossGeolocator.Current.GetPositionAsync(TimeSpan.FromSeconds(5), null, true);

Expected Behavior

posPosition should either be null or populated with position details.

Actual Behavior

Throws an exception

Code snippet

Screenshotst

FIELDPOINT avatar Mar 10 '20 21:03 FIELDPOINT

@FIELDPOINT I have the same issue.. Have you been able to solve this?

programmingworld1 avatar May 08 '20 12:05 programmingworld1

No it seems to be an issue only in the newer version so I reverted.

FIELDPOINT avatar May 08 '20 13:05 FIELDPOINT

@FIELDPOINT Thanks, I did the same, its working now.

programmingworld1 avatar May 08 '20 13:05 programmingworld1

I'm having this problem. The issue is on the newer version of what? What do I need to revert?

TheWatchfulOne avatar May 23 '21 07:05 TheWatchfulOne