ytpm
ytpm

Reputation: 5150

Google Places autocomplete does not exist in GoogleMaps SDK

I've used CocoaPods to import GoogleMaps to my project:

pods 'GoogleMaps'

Then I tried to import <GoogleMaps/GoogleMaps.h> and use the GMSAutocompleteViewController but it does not exist in the project!

I'm trying to implement the delegate GMSAutocompleteViewControllerDelegate, but it is nowhere to be found.

Can someone explain why?

Upvotes: 1

Views: 1445

Answers (3)

tjay
tjay

Reputation: 31

Google updated the maps api and has split into 2. Add pod 'GooglePlaces' to your pod file and then add

@import GooglePlaces;

Upvotes: 0

Mad Burea
Mad Burea

Reputation: 541

Well this is somewhat old question but actually i have faced same problem. i have done some research and then i found that version of google SDK was 1.10.3, and in that SDK there was no any controller like GMSAutocompleteViewController

so only thing to do update the latest version of google map SDK.

i have tried this pods 'GoogleMaps' but it does not update latest version it always update 1.10.3.

then finally i have tried giving version in pod file like this pod ‘GoogleMaps’ ,‘ ~> 1.13.2’ now problem is solved.

Upvotes: 1

Starlord
Starlord

Reputation: 313

Try to use @import GoogleMaps instead of <GoogleMaps/GoogleMaps.h>, see google's documentation for more instructions

Google ios map guide

hope this helps !

Upvotes: 0

Related Questions