1

I am getting this error when trying to use the sample code from Google Places getting started Link

Error: Current Place error: The operation couldn’t be completed. An internal error occurred in the Places API library.

I am calling this function on viewDidLoad. I also created a IBAction with this code to make sure it wasn't a timing issue. I got the same error this way as well.

placesClient.currentPlace { (placeLikelihoods, error) in
        guard error == nil else {
            print("Current Place error: \(error!.localizedDescription)")
            return
        }
        if let placeLikelihoods = placeLikelihoods {
            for likelihood in placeLikelihoods.likelihoods {
                let place = likelihood.place
                print(place.name)
            }
        }
    }

I have created a new project in Firebase, which created a new project in Google Dev Console. I created new API Key, Enabled Google Maps and Google Places API. I added CoreLocation framework, my pods are up to date. I should not be hitting any limits as it is just me learning. I have the Location When In Use set up i the Plist - user gets the dialog on fresh install. I accepted it. I added location manager code from here to make sure I am getting the location. I signed up for Apple developer to get the app on my device just in case the location wasn't staying on the simulator. I have a feeling this is something stupid. Please let me know any ideas to get passed this. Thanks!

Community
  • 1
  • 1
Skycamefalling
  • 308
  • 1
  • 12

0 Answers0