Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.
This repository was archived by the owner on May 1, 2024. It is now read-only.

Xamarin.iOS.Google.Places - Unrecognised selector sent to instance #530

@ckomo

Description

@ckomo

Hi, I have upgraded to the latest packages for:

  • Xamarin.iOS.Google.Maps
  • Xamarin.iOS.Google.Places

And am receiving a native crash related to retrieving autocomplete results. The affected method is:

void FindAutocompletePredictions (string query, [NullAllowed] CoordinateBounds bounds, AutocompleteBoundsMode boundsMode, [NullAllowed] AutocompleteFilter filter, [NullAllowed] AutocompleteSessionToken sessionToken, AutocompletePredictionsHandler callback);

Invoking this will result in:

Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[GMSPlacesClient findAutocompletePredictionsFromQuery:bounds:boundsMode:filter:sessionToken:callback:]: unrecognized selector sent to instance.

I believe this caused by changes in the Google Places library and the bindings have not been updated.

The method was deprecated in version 4.0: https://cloud.google.com/blog/products/maps-platform/announcing-version-40-maps-and-places-sdks-ios

The method was changed from:
findAutocompletePredictionsFromQuery:bounds:boundsMode:filter:sessionToken:callback
To:
findAutocompletePredictionsFromQuery:filter:sessionToken:callback

I have created a sample project that reproduces it: https://github.com/ckomo/xamarin_google_places_crash

Thanks for looking into this, hopefully I have included enough information.

-Chris

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions