GooglePlaces Framework Reference
GMSAutocompleteFetcherDelegate
@protocol GMSAutocompleteFetcherDelegate <NSObject>
Protocol for objects that can receive callbacks from GMSAutocompleteFetcher.
-
Called when autocomplete predictions are available.
-
Called when an autocomplete request returns an error.
Declaration
Swift
func didFailAutocompleteWithError(_ error: any Error)
Objective-C
- (void)didFailAutocompleteWithError:(nonnull NSError *)error;
Parameters
error
|
the error that was received.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-11-08 UTC.
[null,null,["Last updated 2024-11-08 UTC."],[[["The `GMSAutocompleteFetcherDelegate` protocol handles callbacks from `GMSAutocompleteFetcher`."],["It provides methods to receive autocomplete predictions or error messages during the autocomplete process."],["`didAutocompleteWithPredictions:` is called when predictions are available, providing an array of `GMSAutocompletePrediction` objects."],["`didFailAutocompleteWithError:` is called if an error occurs during the autocomplete request, providing an `NSError` object."]]],["The `GMSAutocompleteFetcherDelegate` protocol handles callbacks from `GMSAutocompleteFetcher`. It defines two key methods: `didAutocompleteWithPredictions:`, which is called when autocomplete predictions are available and provides an array of `GMSAutocompletePrediction` objects; and `didFailAutocompleteWithError:`, which is invoked when an autocomplete request encounters an error, passing the received error as a parameter. These methods enable the delegate to manage successful prediction retrieval and error handling.\n"]]