GooglePlaces Framework Reference

GMSPlaceReview

@interface GMSPlaceReview : NSObject

This class represents a single place review.

  • Instantiates a GMSPlaceReview with detail properties.

    Declaration

    Swift

    init(publishDate: Date, relativePublishDateDescription: String?, text: String?, textLanguageCode: String?, originalText: String?, originalTextLanguageCode: String?, rating: Float, authorAttribution: GMSPlaceAuthorAttribution?)

    Objective-C

    - (nonnull instancetype)
                   initWithPublishDate:(nonnull NSDate *)publishDate
        relativePublishDateDescription:
            (nullable NSString *)relativePublishDateDescription
                                  text:(nullable NSString *)text
                      textLanguageCode:(nullable NSString *)textLanguageCode
                          originalText:(nullable NSString *)originalText
              originalTextLanguageCode:(nullable NSString *)originalTextLanguageCode
                                rating:(float)rating
                     authorAttribution:
                         (nullable GMSPlaceAuthorAttribution *)authorAttribution;

    Parameters

    publishDate

    The NSDate the review was published.

    relativePublishDateDescription

    The description of the publish date relative to the time of the request.

    text

    The localized text of the review.

    textLanguageCode

    The language code of the localized review text.

    originalText

    The review text in its original language.

    originalTextLanguageCode

    The language code the review was originally written in.

    rating

    The 0.0 - 5.0 rating associated with the review.

    authorAttribution

    The GMSPlaceAuthorAttribution of the review’s author.

  • The NSDate the review was published.

    Declaration

    Swift

    var publishDate: Date { get }

    Objective-C

    @property (nonatomic, copy, readonly) NSDate *_Nonnull publishDate;
  • A formatted string expressing the review date/time to the current time. Specific to the language and country (e.g. “6 months ago”).

    Declaration

    Swift

    var relativePublishDateDescription: String? { get }

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *relativePublishDateDescription;
  • The text of the review.

    Declaration

    Swift

    var text: String? { get }

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *text;
  • The language code of the text of the review.

    Declaration

    Swift

    var textLanguageCode: String? { get }

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *textLanguageCode;
  • The text of the review in its original language.

    Declaration

    Swift

    var originalText: String? { get }

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *originalText;
  • The language code of the original text of the review.

    Declaration

    Swift

    var originalTextLanguageCode: String? { get }

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *originalTextLanguageCode;
  • A whole number between 1.0 and 5.0, a.k.a. the number of stars.

    Declaration

    Swift

    var rating: Double { get }

    Objective-C

    @property (nonatomic, readonly) double rating;
  • The attribution that must be shown to the user if this review is displayed.

    See Other Attribution Requirements for more details.

    Declaration

    Swift

    var authorAttribution: GMSPlaceAuthorAttribution? { get }

    Objective-C

    @property (nonatomic, readonly, nullable) GMSPlaceAuthorAttribution *authorAttribution;