Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Native crash on iPhone6

LeloLelo Member ✭✭✭
edited October 25 in Xamarin.Forms

When I instantiate like:

var request = new MKLocalSearchRequest(inputText);

From MapKit I get a native crash on iPhone6:

2020-10-25 10:26:54.406 MyApp.iOS[336:14311] -[MKLocalSearchRequest initWithNaturalLanguageQuery:region:]: unrecognized selector sent to instance >0x280839b80
2020-10-25 10:26:54.466 MyApp.iOS[336:14311] a managed exception was thrown in native code: Objective-C exception thrown. Name: >NSInvalidArgumentException Reason: -[MKLocalSearchRequest initWithNaturalLanguageQuery:region:]: unrecognized selector sent to instance >0x280839b80

When I ran it with iPhone11 it works and I can instantiate with no problem.

I first thought it might have been som threading issue, but I called it on the main thread and it also does not work.
What could be the issue?

Tagged:

Best Answer

  • LeloLelo Member ✭✭✭
    Accepted Answer

    It worked to:

    var request = new MKLocalSearchRequest();
    request.NaturalLanguageQuery = inputText;
    

Answers

  • LeloLelo Member ✭✭✭
    Accepted Answer

    It worked to:

    var request = new MKLocalSearchRequest();
    request.NaturalLanguageQuery = inputText;
    
Sign In or Register to comment.