AI-generated Key Takeaways
- 
          GMSPlaceis an immutable class that represents a particular physical place, encapsulating information like name, location, and other relevant details.
- 
          It provides access to various properties such as name, place ID, coordinates, phone number, address, rating, reviews, price level, and more. 
- 
          GMSPlacealso offers information about operating hours, including regular and secondary hours, and special day entries.
- 
          Additionally, it includes attributes about dining options (like takeout, delivery, dine-in), service offerings (serves breakfast, lunch, etc.), and accessibility features. 
- 
          Developers can use this class to retrieve and display detailed information about places within their applications using the Google Maps SDK for iOS. 
GMSPlace
@interface GMSPlace : NSObjectRepresents a particular physical place. A GMSPlace encapsulates information about a physical
location, including its name, location, and any other information we might have about it. This
class is immutable.
- 
                  
                  Name of the place. DeclarationSwift var name: String? { get }Objective-C @property (nonatomic, copy, readonly, nullable) NSString *name;
- 
                  
                  Place ID of this place. DeclarationSwift var placeID: String? { get }Objective-C @property (nonatomic, copy, readonly, nullable) NSString *placeID;
- 
                  
                  Location of the place. The location is not necessarily the center of the Place, or any particular entry or exit point, but some arbitrarily chosen point within the geographic extent of the Place. DeclarationSwift var coordinate: CLLocationCoordinate2D { get }Objective-C @property (nonatomic, readonly) CLLocationCoordinate2D coordinate;
- 
                  
                  Phone number of this place, in international format, i.e. including the country code prefixed with “+”. For example, Google Sydney’s phone number is “+61 2 9374 4000”. DeclarationSwift var phoneNumber: String? { get }Objective-C @property (nonatomic, copy, readonly, nullable) NSString *phoneNumber;
- 
                  
                  Address of the place as a simple string. DeclarationSwift var formattedAddress: String? { get }Objective-C @property (nonatomic, copy, readonly, nullable) NSString *formattedAddress;
- 
                  
                  Five-star rating for this place based on user reviews. Ratings range from 1.0 to 5.0. 0.0 means we have no rating for this place (e.g. because not enough users have reviewed this place). DeclarationSwift var rating: Float { get }Objective-C @property (nonatomic, readonly) float rating;
- 
                  
                  An array of GMSPlaceReviewobjects representing the user reviews of the place.DeclarationSwift var reviews: [GMSPlaceReview]? { get }Objective-C @property (nonatomic, copy, readonly, nullable) NSArray<GMSPlaceReview *> *reviews;
- 
                  
                  Price level for this place, as integers from 0 to 4. e.g. A value of 4 means this place is “$$$$” (expensive). A value of 0 means free (such as a museum with free admission). DeclarationSwift var priceLevel: GMSPlacesPriceLevel { get }Objective-C @property (nonatomic, readonly) GMSPlacesPriceLevel priceLevel;
- 
                  
                  at https://developers.google.com/maps/documentation/places/ios-sdk/place-types for Places (New) and https://developers.google.com/maps/documentation/places/ios-sdk/supported_types for Places. DeclarationSwift var types: [String]? { get }Objective-C @property (nonatomic, copy, readonly, nullable) NSArray<NSString *> *types;
- 
                  
                  Website for this place. DeclarationSwift var website: URL? { get }Objective-C @property (nonatomic, copy, readonly, nullable) NSURL *website;
- 
                  
                  The data provider attribution string for this place. These are provided as a NSAttributedString, which may contain hyperlinks to the website of each provider. In general, these must be shown to the user if data from this GMSPlaceis shown, as described in the Places SDK Terms of Service.DeclarationSwift @NSCopying var attributions: NSAttributedString? { get }Objective-C @property (nonatomic, copy, readonly, nullable) NSAttributedString *attributions;
- 
                  
                  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 GMSPlaceobject representing a store may have a relatively small viewport, while aGMSPlaceobject representing a country may have a very large viewport.DeclarationSwift var viewportInfo: GMSPlaceViewportInfo? { get }Objective-C @property (nonatomic, strong, readonly, nullable) GMSPlaceViewportInfo *viewportInfo;
- 
                  
                  An array of GMSAddressComponentobjects representing the components in the place’s address. These components are provided for the purpose of extracting structured information about the place’s address: for example, finding the city that a place is in.These components should not be used for address formatting. If a formatted address is required, use the formattedAddressproperty, which provides a localized formatted address.DeclarationSwift var addressComponents: [GMSAddressComponent]? { get }Objective-C @property (nonatomic, copy, readonly, nullable) NSArray<GMSAddressComponent *> *addressComponents;
- 
                  
                  The Plus code representation of location for this place. DeclarationSwift var plusCode: GMSPlusCode? { get }Objective-C @property (nonatomic, strong, readonly, nullable) GMSPlusCode *plusCode;
- 
                  
                  The normal business Opening Hours information for this place. Includes open status, periods and weekday text when available. DeclarationSwift var openingHours: GMSOpeningHours? { get }Objective-C @property (nonatomic, strong, readonly, nullable) GMSOpeningHours *openingHours;
- 
                  
                  Returns this place’s hours of operation over the next seven days. The time period starts at midnight on the date of the request and ends at 11:59 pm six days later. GMSPlaceSpecialDayentries onGMSOpeningHourswill only be present forGMSPlacecurrentOpeningHoursandGMSPlacesecondaryOpeningHours.DeclarationSwift var currentOpeningHours: GMSOpeningHours? { get }Objective-C @property (nonatomic, strong, readonly, nullable) GMSOpeningHours *currentOpeningHours;
- 
                  
                  Returns an array of this place’s secondary hour(s) of operation over the next seven days. Secondary hours are different from a business’s main hours. For example, a restaurant can specify drive through hours or delivery hours as its secondary hours. See GMSPlaceHoursTypefor the different types of secondary hours.GMSPlaceSpecialDayentries onGMSOpeningHourswill only be present forGMSPlacecurrentOpeningHoursandGMSPlacesecondaryOpeningHours.DeclarationSwift var secondaryOpeningHours: [GMSOpeningHours]? { get }Objective-C @property (nonatomic, copy, readonly, nullable) NSArray<GMSOpeningHours *> *secondaryOpeningHours;
- 
                  
                  Represents how many reviews make up this place’s rating. DeclarationSwift var userRatingsTotal: UInt { get }Objective-C @property (nonatomic, readonly) NSUInteger userRatingsTotal;
- 
                  
                  An array of GMSPlacePhotoMetadataobjects representing the photos of the place.DeclarationSwift var photos: [GMSPlacePhotoMetadata]? { get }Objective-C @property (nonatomic, copy, readonly, nullable) NSArray<GMSPlacePhotoMetadata *> *photos;
- 
                  
                  The timezone UTC offset of the place in minutes. DeclarationSwift var utcOffsetMinutes: NSNumber? { get }Objective-C @property (nonatomic, readonly, nullable) NSNumber *UTCOffsetMinutes;
- 
                  
                  The GMSPlaceBusinessStatusof the place.DeclarationSwift var businessStatus: GMSPlacesBusinessStatus { get }Objective-C @property (nonatomic, readonly) GMSPlacesBusinessStatus businessStatus;
- 
                  
                  Returns this place’s editorial summary. DeclarationSwift var editorialSummary: String? { get }Objective-C @property (nonatomic, copy, readonly, nullable) NSString *editorialSummary;
- 
                  
                  Returns this place’s EV charging options. DeclarationSwift var evChargeOptions: GMSPlaceEVChargeOptions? { get }Objective-C @property (nonatomic, readonly, nullable) GMSPlaceEVChargeOptions *evChargeOptions;
- 
                  
                  Returns this place’s parking options. DeclarationSwift var parkingOptions: GMSPlaceParkingOptions? { get }Objective-C @property (nonatomic, readonly, nullable) GMSPlaceParkingOptions *parkingOptions;
- 
                  
                  Returns this place’s EV charge amenity summary. DeclarationSwift var evChargeAmenitySummary: GMSPlaceEVChargeAmenitySummary? { get }Objective-C @property (nonatomic, readonly, nullable) GMSPlaceEVChargeAmenitySummary *evChargeAmenitySummary;
- 
                  
                  Returns this place’s generative summary. DeclarationSwift var generativeSummary: GMSPlaceGenerativeSummary? { get }Objective-C @property (nonatomic, readonly, nullable) GMSPlaceGenerativeSummary *generativeSummary;
- 
                  
                  Returns this place’s neighborhood summary. DeclarationSwift var neighborhoodSummary: GMSPlaceNeighborhoodSummary? { get }Objective-C @property (nonatomic, readonly, nullable) GMSPlaceNeighborhoodSummary *neighborhoodSummary;
- 
                  
                  Returns this place’s review summary. DeclarationSwift var reviewSummary: GMSPlaceReviewSummary? { get }Objective-C @property (nonatomic, readonly, nullable) GMSPlaceReviewSummary *reviewSummary;
- 
                  
                  Returns this place’s consumer alert. DeclarationSwift @NSCopying var consumerAlert: GMSPlaceConsumerAlert? { get }Objective-C @property (nonatomic, copy, readonly, nullable) GMSPlaceConsumerAlert *consumerAlert;
- 
                  
                  Unavailable Default init is not available. DeclarationObjective-C - (nonnull instancetype)init;
- 
                  
                  Deprecated (This method is deprecated in favor of GMSPlacesClient#isOpenAtDate:place:date:callbackand will be removed in a future release.Calculates if a place is open based on openingHours,UTCOffsetMinutes, anddate.DeclarationSwift func isOpen(at date: Date) -> GMSPlaceOpenStatusObjective-C - (GMSPlaceOpenStatus)isOpenAtDate:(nonnull NSDate *)date;ParametersdateA reference point in time used to determine if the place is open. Return ValueGMSPlaceOpenStatusOpenif the place is open,GMSPlaceOpenStatusClosedif the place is closed, andGMSPlaceOpenStatusUnknownif the open status is unknown.
- 
                  
                  Deprecated (This method is deprecated in favor of GMSPlacesClient#isOpen:place:callbackand will be removed in a future release.Calculates if a place is open based on openingHours,UTCOffsetMinutes, and current date and time obtained from[NSDate date].Return ValueGMSPlaceOpenStatusOpenif the place is open,GMSPlaceOpenStatusClosedif the place is closed, andGMSPlaceOpenStatusUnknownif the open status is unknown.
- 
                  
                  Background color of the icon according to Place type, to color the view behind the icon. DeclarationSwift var iconBackgroundColor: UIColor? { get }Objective-C @property (nonatomic, readonly, nullable) UIColor *iconBackgroundColor;
- 
                  
                  The URL according to Place type, which you can use to retrieve the NSData of the Place icon. NOTES: URL link does not expire and the image size aspect ratio may be different depending on type. DeclarationSwift var iconImageURL: URL? { get }Objective-C @property (nonatomic, readonly, nullable) NSURL *iconImageURL;
- 
                  
                  Place Attribute for takeout experience. DeclarationSwift var takeout: GMSBooleanPlaceAttribute { get }Objective-C @property (nonatomic, readonly) GMSBooleanPlaceAttribute takeout;
- 
                  
                  Place Attribute for delivery services. DeclarationSwift var delivery: GMSBooleanPlaceAttribute { get }Objective-C @property (nonatomic, readonly) GMSBooleanPlaceAttribute delivery;
- 
                  
                  Place Attribute for dine in experience. DeclarationSwift var dineIn: GMSBooleanPlaceAttribute { get }Objective-C @property (nonatomic, readonly) GMSBooleanPlaceAttribute dineIn;
- 
                  
                  Place Attribute for curbside pickup services. DeclarationSwift var curbsidePickup: GMSBooleanPlaceAttribute { get }Objective-C @property (nonatomic, readonly) GMSBooleanPlaceAttribute curbsidePickup;
- 
                  
                  Place Attribute indicating place is popular with tourists. DeclarationSwift var reservable: GMSBooleanPlaceAttribute { get }Objective-C @property (nonatomic, readonly) GMSBooleanPlaceAttribute reservable;
- 
                  
                  Place Attribute indicating place serves breakfast. DeclarationSwift var servesBreakfast: GMSBooleanPlaceAttribute { get }Objective-C @property (nonatomic, readonly) GMSBooleanPlaceAttribute servesBreakfast;
- 
                  
                  Place Attribute indicating place serves lunch. DeclarationSwift var servesLunch: GMSBooleanPlaceAttribute { get }Objective-C @property (nonatomic, readonly) GMSBooleanPlaceAttribute servesLunch;
- 
                  
                  Place Attribute indicating place serves dinner. DeclarationSwift var servesDinner: GMSBooleanPlaceAttribute { get }Objective-C @property (nonatomic, readonly) GMSBooleanPlaceAttribute servesDinner;
- 
                  
                  Place Attribute indicating place serves beer. DeclarationSwift var servesBeer: GMSBooleanPlaceAttribute { get }Objective-C @property (nonatomic, readonly) GMSBooleanPlaceAttribute servesBeer;
- 
                  
                  Place Attribute indicating place serves wine. DeclarationSwift var servesWine: GMSBooleanPlaceAttribute { get }Objective-C @property (nonatomic, readonly) GMSBooleanPlaceAttribute servesWine;
- 
                  
                  Place Attribute indicating place serves brunch. DeclarationSwift var servesBrunch: GMSBooleanPlaceAttribute { get }Objective-C @property (nonatomic, readonly) GMSBooleanPlaceAttribute servesBrunch;
- 
                  
                  Place Attribute indicating place serves vegetarian food. DeclarationSwift var servesVegetarianFood: GMSBooleanPlaceAttribute { get }Objective-C @property (nonatomic, readonly) GMSBooleanPlaceAttribute servesVegetarianFood;
- 
                  
                  Place Attribute indicating place is wheelchair accessible at the entrance. DeclarationSwift var wheelchairAccessibleEntrance: GMSBooleanPlaceAttribute { get }Objective-C @property (nonatomic, readonly) GMSBooleanPlaceAttribute wheelchairAccessibleEntrance;
- 
                  
                  Place Attribute indicating place is a pure service area business. A pure service area business is a business that visits or delivers to customers directly, but does not serve customers at their business address. For example, businesses like cleaning services or plumbers. Those businesses may not have a physical address or location on Google Maps. Places will not return fields including location,plusCode, and other location related fields for these businesses.DeclarationSwift var pureServiceAreaBusiness: GMSBooleanPlaceAttribute { get }Objective-C @property (nonatomic, readonly) GMSBooleanPlaceAttribute pureServiceAreaBusiness;