Google Places iOS - Can't load search result

google places autocomplete api ios
google places api
google place picker ios deprecated
google nearby places api ios
can t load search results google places ios swift
google maps ios sdk
google places sdk
google places autocomplete textfield swift

I am using GMSAutoCompleteViewController from Google Places API in my iOS Project.

Suddenly today my GMSAutoCompleteViewController keeps on giving me error "Can't load Search Results".

I have regenerated my API Key using fresh one. I have tried everything, but still some how it does not work.

I am using Objective-C. Can anyone help ?

Code

GMSAutocompleteViewController *acController = [[GMSAutocompleteViewController alloc] init];
    acController.delegate = self;
[self.navigationController pushViewController:acController animated:YES];

Delegate Methods

- (void)viewController:(GMSAutocompleteViewController *)viewController
                didAutocompleteWithPlace:(GMSPlace *)place {
    // Do something with the selected place.
    NSLog(@"Place name %@", place.name);
    NSLog(@"Place address %@", place.formattedAddress);
    NSLog(@"Place attributions %@", place.attributions.string);
    NSLog(@"Latitude = %.20f",place.coordinate.latitude);
    NSLog(@"Longitude = %.20f",place.coordinate.longitude);
    NSLog(@"Type = %@",place.types);
    NSLog(@"Place ID = %@",place.placeID);
    //[self dismissViewControllerAnimated:YES completion:nil];
    [self.navigationController popViewControllerAnimated:YES];

    /* Call and API in background to get the address according to the new LAT AND LONG as well
     Once get the address from there we can store the latitude and longitude in the cache
     if type of search is Postal code then we have to call another web service i.e. FIND ADDRESS to get the whole exact address */

    [self callWS_ConvertLatLongWithLatitude:[NSString stringWithFormat:@"%.20f",place.coordinate.latitude]
                               andLongitude:[NSString stringWithFormat:@"%.20f",place.coordinate.longitude]
                               inBackground:NO];

}

- (void)viewController:(GMSAutocompleteViewController *)viewController
didFailAutocompleteWithError:(NSError *)error {

    NSLog(@"error: %ld", [error code]);

    [self.navigationController popViewControllerAnimated:YES];

}

// User canceled the operation.
- (void)wasCancelled:(GMSAutocompleteViewController *)viewController {
    NSLog(@"Autocomplete was cancelled.");

    [self.navigationController popViewControllerAnimated:YES];
}

// Turn the network activity indicator on and off again.
- (void)didRequestAutocompletePredictions:(GMSAutocompleteViewController *)viewController {
    [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
}

- (void)didUpdateAutocompletePredictions:(GMSAutocompleteViewController *)viewController {
    [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
}

Makesure Google Places API for IOS is enabled.

  1. Go to your https://console.developers.google.com/apis/
  2. Choose "Library" - "Google Places API for iOS"
  3. ENABLE (Blue Button)

API Key as same as Google Maps APIKey

Get Started | Places SDK for iOS, The Places SDK for iOS is available as a CocoaPod pod, GooglePlaces, which contains all This will install the APIs specified in the Podfile , along with any  The Places SDK for iOS is available as a CocoaPod pod, GooglePlaces, which contains all places functionality. CocoaPods is an open source dependency manager for Swift and Objective-C Cocoa

After 18th June 2018 , google have restrict the limit and changed the policy,you need to enable billing after then it will be work.

I was already enabled the google places api and google map api but still it was showing the error .

After enable the billing its resolved

Places SDK for iOS Release Notes, https://developers.google.com › Google Maps Platform › Places SDK for iOS To view or change quota limits for the Places SDK for iOS: Go to the Google Cloud Platform Console. Click the project drop-down and select a project. Open the Quotas page.

I faced the same issue. When i went back and checked the billing account page again i noticed that it has doesn't have my current working project name listed . Once i added my current project , it worked.

Make sure your current project is listed in the billing page

Place Autocomplete | Places SDK for iOS, You can add the autocomplete UI control to your app in the following ways: Add a full-screen control; Add a results controller; Use a table data  Can't load search results Google Places ios Swift. 0. Can't load search results - Google Places. Related. 654. Google Maps JS API v3 - Simple Multiple Marker Example

-> Make sure to Update to latest version of the Google Places Pod (GooglePlacepicker is Deprecated)

-> Enable API of Google Places

-> Also Check APIKey is Proper

GooglePlaces on CocoaPods.org, Google Places API for iOS. This Pod contains all the Google Places API for iOS functionality which does not require a map. If you wish to use the [Place Picker] The place ID used in the Places SDK for iOS is the same identifier as used in the Places API, Places SDK for Android and other Google APIs. Each place ID can refer to only one place, but a single

Understand your Place in this World -- Getting Started with the , You can get Xcode at https://developer.apple.com/xcode/. CocoaPods. The Google Places API for iOS is available as a CocoaPods pod. CocoaPods is an open  Members of the Google Maps and Google Places APIs team monitor several Google Maps and Google Places related tags on Stack Overflow. You can look for Places SDK for iOS-specific topics by adding

Google Places API in iOS application, You can use the Places API in mobile apps that are free or sold online through a mobile app store such as the Apple App Store or Android Market. For fee desktop   To use the Places SDK for iOS you must have an API key. The API key is a unique identifier that is used to authenticate requests associated with your project for usage and billing purposes. Get the

tolu360/react-native-google-places: iOS/Android Google , iOS/Android Google Places Widgets (Autocomplete Modals) and API (in Google Play Services 16.0.0) is deprecated as of January 29, 2019, and will be turned  Use details on over 150 million places and points of interest to help users find you, attract customers with reviews, and even help detect fraud. Whether you do business in Barcelona or Baltimore, you can count on the same high-quality Google Maps experiences your users know and love.

Comments
  • Before you able to get search result or at starting you get this error ? and did you set GMSPlacesClient.provideAPIKey("API_KEY_HERE") in didFinishLaunchingWithOptions
  • untill yesterday i was able to get search results. suddenly today I am getting error.
  • if I keep on pressing "Try Again", it shows me some result list, I select one result from there and again it shows me "Can't load search result"
  • I believe you experienced an issue reported here: issuetracker.google.com/issues/64280749
  • True, this was the same issue. I also reported it on google issue tracker. Thank God its resolved now. :-)
  • it already enable , some time it return data but mostly time no data
  • facing same issue. It works once in 10 times. Unable to understand the issue.
  • anyone found different solution for this problem?
  • any reference document?