I'm allowing users to search places in my iPhone project. For that i'm using Google Places API for iOS. I'm using the following code in my project.
- (void) makeAutoComplete :(UITextField *) textField
{
NSLog(@"Searching for :%@",textField.text);
GMSAutocompleteFilter *filter = [[GMSAutocompleteFilter alloc] init];
filter.type = kGMSPlacesAutocompleteTypeFilterEstablishment;
// [_placesClient autocompleteQuery:@"fun republic mall"
[_placesClient autocompleteQuery:textField.text
bounds:nil
filter:filter
callback:^(NSArray *results, NSError *error) {
if (error != nil) {
NSLog(@"Autocomplete error %@", [error localizedDescription]);
return;
}
// NSLog(@"%@",results);
NSString *searchedResults = @"";
for (GMSAutocompletePrediction* result in results) {
NSLog(@"Result '%@' with placeID %@", result.attributedFullText.string, result.placeID);
searchedResults = [searchedResults stringByAppendingString:[NSString stringWithFormat:@"%@ /n",result.attributedFullText.string]];
}
//displaying searched results in console
NSLog(@"Filter %@",searchedResults);
}];
}
It's working fine in my iOS 8.1 version devices. But when i try to run the same project in iOS 6.1 version, i'm getting the following error.
dyld: Symbol not found: _NSURLSessionDownloadTaskResumeData
Referenced from: /var/mobile/Applications/0451B511-AA2F-0000-0000-0FA4D53DABC1/GMS.app/GMS
Expected in: /System/Library/Frameworks/Foundation.framework/Foundation
in /var/mobile/Applications/0451B511-AA2F-0000-0000-0FA4D53DABC1/GMS.app/GMS
Even If i try to run the SDKDemo in iOS 6.1 i'm getting the same error. But it's working fine in OS 8.1 devices.
Can anyone please provide any suggestions to use google places search API in iOS 6.1 version.
I also want to know the minimum iOS version support to use Google Places API