I am trying to use the Google Places API autocomplete feature in my code.
import UIKit
import GoogleMaps
class ViewController: UIViewController, GMSMapViewDelegate {
var placesClient: GMSPlacesClient?
override func viewDidLoad() {
super.viewDidLoad()
placesClient = GMSPlacesClient()
let filter = GMSAutocompleteFilter()
filter.type = GMSPlacesAutocompleteTypeFilter.City
placesClient?.autocompleteQuery("Pizza", bounds: nil, filter: filter, callback: { (results, error: NSError?) -> Void in
if let error = error {
print("Autocomplete error \(error)")
}
for result in results! {
if let result = result as? GMSAutocompletePrediction {
print("Result \(result.attributedFullText) with placeID \(result.placeID)")
}
}
})
}
}
When I run it I am getting this error: CoreData: Failed to load optimized model at path '/var/mobile/Containers/Bundle/Application/
Any ideas?