Currently on iOS we are using the URL directly like so:
let parameters = @{
@"input": query,
@"key": @"MY_API_KEY",
@"language": "en",
@"components": @"country:ca",
};
let url = @"https://maps.googleapis.com/maps/api/place/autocomplete/json";
let request = [self createRequest:url parameters: parameters];
let task = [self dataTaskWithRequest:request completionHandler:^(NSURLResponse *response, id responseObject, NSError *error) {
if ([responseObject[@"status"] isEqualToString:@"OK"]) {
let predictions = (NSArray<NSDictionary *> *)responseObject[@"predictions"];
//parse predictions..
completion(predictions, nil);
}
//..handle error..
}];
We have gotten an email about deprecation of the Google Places API:
We are writing to remind you that the previous version of Places SDK for Google Maps Platform has been deprecated in January 29, 2019, and will be turned off on July 29, 2019.
In the email it contains a link to: https://developers.google.com/places/ios-sdk/client-migration
My question is, do I really have to import the entire iOS Maps-SDK and iOS Places-SDK just to keep autocomplete suggestions working?
It is much less code for me to make the request and I don't have to import 70mb+ of SDKs..
Is this URL "https://maps.googleapis.com/maps/api/place/autocomplete/json" going to be deprecated too? Or just the SDKs?
autotype to Objective-C via__auto_typeand it was in WWDC so I used it since the rest of my code base uses it. - Brandon