几年后,此question中描述的问题再次出现,
在最新版本的GooglePlaces cocoapod(3.3.7)中,尽管[class]接口中存在该字段,但无法访问viewport字段
//
// GMSPlace.h
// Google Places SDK for iOS
//
// Copyright 2016 Google Inc.
//
// Usage of this SDK is subject to the Google Maps/Google Earth APIs Terms of
// Service: https://developers.google.com/maps/terms
//
.....
other fields
.....
/**
* The recommended viewport for this place. May be nil if the size of the place is not known.
*
* This returns a viewport of a size that is suitable for displaying this place. For example, a
* |GMSPlace| object representing a store may have a relatively small viewport, while a |GMSPlace|
* object representing a country may have a very large viewport.
*/
@property(nonatomic, strong, readonly, nullable) GMSCoordinateBounds *viewport;
.....
.....
需要更新才能确保与API兼容,并且该字段对于应用程序的业务逻辑非常重要,我该怎么办?
谢谢!
确保同时导入GooglePlaces