Bug 53083 - MKLocalSearchRequest lacks MKLocalSearchCompletion constructor
Summary: MKLocalSearchRequest lacks MKLocalSearchCompletion constructor
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
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)

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

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.