After a few years the problem described in this question reappears,
in the latest versions of GooglePlaces cocoapod (3.3.7) the viewport field is not accessible although the field is present in the class interface
//
// 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;
.....
.....
The update is required to ensure compatibility with the API and the field is very important for the app's business logic, what can I do?
Thanks!
Make sure you import both GooglePlaces and GoogleMapsBase.
GMSCoordinateBounds is defined in GoogleMapBase.
Google mentions this change in the version 3.5.0 changelog: https://developers.google.com/places/ios-sdk/releases
GooglePlaces/GooglePlaces.h no longer transitively includes classes from GoogleMapsBase.h, so if you use the GMSCoordinateBounds class in your code, you must now #import GoogleMapsBase/GoogleMapsBase.h as well.