8

I'm trying to implement Google Auto complete service and, I get this message:

Use of undeclared type 'GMSPlacesClient'

I imported Google Maps module and it works with GMSMapView... I don't understand what is happening. Does anyone have the same error?
This is a picture of the error:

ErrorImage

ErrorImage

Thank you very much!

Kyle Howells
  • 3,008
  • 1
  • 25
  • 35
tornic
  • 747
  • 6
  • 15

5 Answers5

18

I have also face the same issue. To resolve this I have add pod GooglePlaces in my pod file and update the pod.

Also you need to replace import import GoogleMaps To import GooglePlaces

Crazy Developer
  • 3,464
  • 3
  • 28
  • 62
8

I found the problem. Google has divided his API in two parts. Last release splits the Places API from the Maps SDK (since Version 2.0.0 - July 26, 2016). You can find it in the release notes: https://developers.google.com/places/ios-api/releases?hl=es

tornic
  • 747
  • 6
  • 15
1

I bumped the same problem recently. It seems that the reason of issue is updated GoogleMap library. They changed their API. My solution was just return to the previous version of GoogleMaps. For me the working version is 1.13.2.

If you want to specify the v1.13.2 you can put it to the Podfile:

pod 'GoogleMaps', '~> 1.13.2'
Svitlana
  • 2,938
  • 1
  • 29
  • 38
1

Add this

import <GooglePlaces/GooglePlaces.h>

into

TSTHelmet-Bridging-Header.h

0

Open your terminal, cd to your project folder and run pod update, or better yet pod update --verbose.