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-05-04 17:52 UTC (History)
4 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: https://developer.xamarin.com/api/type/MonoTouch.MapKit.MKLocalSearchRequest/

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)

[1] https://github.com/xamarin/maccore/commit/ac391fa092578503eaca9a1ba4bdbb4b68612d7e
Comment 3 Sebastien Pouliot 2017-03-07 04:06:06 UTC
PR master https://github.com/xamarin/xamarin-macios/pull/1832
Comment 5 Roshan Mankani 2017-05-04 10:05:10 UTC
Hello @Rolf,

The steps are missing in this bug so can you provide steps for verify this bug.
Comment 6 Rolf Bjarne Kvinge [MSFT] 2017-05-04 17:52:50 UTC
@Roshan, there's no need to verify this bug, it's just an API addition.

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