2

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

Prabhu
  • 840
  • 11
  • 28

2 Answers2

2

The Google Maps SDK for iOS only supports iOS 7.0 and up.

From https://developers.google.com/maps/documentation/ios-sdk/releases:

The minimum target iOS version for Google Maps SDK for iOS is now 7.0. Version 6.0 is no longer supported.

Jamie McCloskey
  • 379
  • 1
  • 2
1

Only Above versions of iOS 7.0 supports SDK. SO please use the suitable one to run Google maps SDK.

gopinath
  • 141
  • 1
  • 2
  • 5