簡體   English   中英

iOS 6.1中的Google Places API有問題嗎?

[英]Issue with Google Places API in iOS 6.1?

我允許用戶搜索我的iPhone項目中的位置。 為此,我正在使用iOS版Google Places API 我在我的項目中使用以下代碼。

- (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);


                            }];

}

在我的iOS 8.1版本設備中運行正常。 但是,當我嘗試在iOS 6.1版本中運行同一項目時,出現以下錯誤。

  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

即使我嘗試在iOS 6.1中運行SDKDemo,也會遇到相同的錯誤。 但是它在OS 8.1設備中運行良好。

任何人都可以提供任何建議以在iOS 6.1版本中使用Google Places Search API。

我還想知道使用Google Places API的最低iOS版本支持

適用於iOS的Google Maps SDK僅支持iOS 7.0及更高版本。

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

現在,適用於iOS的Google Maps SDK的最低目標iOS版本是7.0。 不再支持6.0版。

僅iOS 7.0以上版本支持SDK。 因此,請使用合適的運行Google Maps SDK。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM