This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 53083 - MKLocalSearchRequest lacks MKLocalSearchCompletion constructor
Summary: MKLocalSearchRequest lacks MKLocalSearchCompletion constructor
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll (show other bugs)
Version: XI 10.2 (iOS 10.1)
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: 15.2
Assignee: Sebastien Pouliot
Depends on:
Reported: 2017-03-06 18:15 UTC by russ
Modified: 2017-03-07 06:48 UTC (History)
2 users (show)

See Also:
Is this bug a regression?: ---
Last known good build:


Description russ 2017-03-06 18:15:55 UTC
MKLocalSearchRequest is intended to have a constructor that accepts an MKLocalSearchCompletion, so you can easily go from autocomplete results to results you can place on a map.

I notice that such a constructor is described here, in the MonoTouch.MapKit API:

However, it's not present when I go to use it in code.  I'm seeing only the default constructor, as described in this API:

I'm in a PCL 4.5 Profile111 project, and my iOS project is targeting version 9.3.

Is there some way to access the appropriate constructor, or a workaround that I can use?  For the time being, I'm simply concatenating the MKLocalSearchCompletion's Title and Subtitle properties into the NaturalLanguageQuery property of an MKLocalSearchRequest after creation.
Comment 1 russ 2017-03-06 19:10:08 UTC
Did some investigation in Xcode on a native project and it seems all that constructor does is the same thing my workaround is doing already...concatenates the Title and Subtitle with a space in between, and sets that to the NaturalLanguageQuery.

So, I'll leave the bug as it seems that constructor should still be implemented, but it's no longer feeling like a priority request :)
Comment 2 Sebastien Pouliot 2017-03-07 02:17:05 UTC
Good catch! It looks like is was only added for classic (not unified) with XI 9.6 / iOS 9.3 support [1]. Git history don't tell why nor do I recall (I did add the API) but I suspect I copy-pasted the !MONOMAC condition (and picked up the !XAMCORE_2_0 withit)

Comment 3 Sebastien Pouliot 2017-03-07 04:06:06 UTC
PR master

Note You need to log in before you can comment on or make changes to this bug.