xamarin / Essentials

Xamarin.Essentials is no longer supported. Migrate your apps to .NET MAUI, which includes Maui.Essentials.
https://aka.ms/xamarin-upgrade
Other
1.52k stars 506 forks source link

Update Map.ios to not use deprecated functions #964

Closed Mrnikbobjeff closed 2 years ago

Mrnikbobjeff commented 4 years ago

Description

GLGeocoder.GeocodeAddressAsync has been superceded by the new and improved GeocodeAdress, which takes user locale and region into consideration to improve suggestions. It has been officially deprecated but has no deprecated attribute, it is only visible in the docs/method comments.

jamesmontemagno commented 4 years ago

So, we are using https://developer.apple.com/documentation/corelocation/clgeocoder/1423509-geocodeaddressstring which is not deprecated currently. There is the ability to use a Region or Locale to.

Yes, there is a way of passing in a Region and Locale, but a region would have to be specified as a circular region and the locale is specific to iOS locale settings. So I don't think that it is worth investing unless they actually deprecate this method as they wouldn't apply to any of the other platforms.

Mrnikbobjeff commented 4 years ago

I believe you are incorrect, we use this overload, taking a NSDictionary and not a string. Take a look at our usage here. The first link clearly states that the overload we are using is deprecated, unless I am missing something

jamesmontemagno commented 4 years ago

Oh, yes I thought you were talking about: https://github.com/xamarin/Essentials/blob/master/Xamarin.Essentials/Geocoding/Geocoding.ios.tvos.watchos.cs#L23

jfversluis commented 2 years ago

Seems like this has been addressed long ago, yay us!