Google iOS 版本 3 的位置

Google Places for iOS version 3

今天 Google 为 iOS 发布了 Places API 的第 3 版。升级我的项目并使用新的 findPlaceLikelihoodsFromCurrentLocationWithPlaceFields 方法我收到以下错误:

"Pick Place error The operation couldn’t be completed. An internal error occurred in the Places API library...."

有什么想法吗?

这是我的完整 Objective C 代码:

GMSPlaceField fields = GMSPlaceFieldName;
GMSPlacesClient *placesClient;
placesClient = [GMSPlacesClient sharedClient];

[placesClient findPlaceLikelihoodsFromCurrentLocationWithPlaceFields:fields callback:^(NSArray* likelihoods, NSError* error){

    if(error != nil)
    {
        //##
        NSLog(@"Pick Place error %@", [error localizedDescription]);
        return;
    }

    for(GMSPlaceLikelihood *likelihood in likelihoods)
    {
        //##
        NSLog(@"likelihood.place : %@",likelihood.place.name);
    }
}];

原来 Google 改变了一些事情,但并不十分明显。

在我的例子中,我曾经在 API 键上添加了 "Places SDK for iOS" 限制,但是新的东西需要“Places API" 限制。