# GooglePlaces Framework Reference

# GMSAutocompletePrediction

Deprecated

Use `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSAutocompleteSuggestion.html` instead.


    @interface GMSAutocompletePrediction : NSObject

This class represents a prediction of a full query based on a partially typed string.
- `


  ### [attributedFullText](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSAutocompletePrediction#/c:objc(cs)GMSAutocompletePrediction(py)attributedFullText)


  ` Deprecated

  Use `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSAutocompleteSuggestion.html` instead.
  The full description of the prediction as a NSAttributedString. E.g., "Sydney Opera House,
  Sydney, New South Wales, Australia".

  Every text range that matches the user input has a `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Constants/kGMSAutocompleteMatchAttribute.html`. For
  example, you can make every match bold using enumerateAttribute:

  ```
     UIFont *regularFont = [UIFont systemFontOfSize:[UIFont labelFontSize]];
     UIFont *boldFont = [UIFont boldSystemFontOfSize:[UIFont labelFontSize]];

  NSMutableAttributedString *bolded = [prediction.attributedFullText mutableCopy];
     [bolded enumerateAttribute:kGMSAutocompleteMatchAttribute
                        inRange:NSMakeRange(0, bolded.length)
                        options:0
                     usingBlock:^(id value, NSRange range, BOOL *stop) {
                       UIFont *font = (value == nil) ? regularFont : boldFont;
                       [bolded addAttribute:NSFontAttributeName value:font range:range];
                     }];

  label.attributedText = bolded;
   
  ```

  <br />

  #### Declaration

  Swift

      @NSCopying var attributedFullText: NSAttributedString { get }

  Objective-C

      @property (nonatomic, copy, readonly) __GMS_AVAILABLE_BUT_DEPRECATED_MSG NSAttributedString *attributedFullText;

- `


  ### [attributedPrimaryText](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSAutocompletePrediction#/c:objc(cs)GMSAutocompletePrediction(py)attributedPrimaryText)


  ` Deprecated

  Use `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSAutocompleteSuggestion.html` instead.
  The main text of a prediction as a NSAttributedString, usually the name of the place.
  E.g. "Sydney Opera House".

  Text ranges that match user input are have a `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Constants/kGMSAutocompleteMatchAttribute.html`,
  like `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSAutocompletePrediction.html#/c:objc(cs)GMSAutocompletePrediction(py)attributedFullText`.

  #### Declaration

  Swift

      @NSCopying var attributedPrimaryText: NSAttributedString { get }

  Objective-C

      @property (nonatomic, copy, readonly) __GMS_AVAILABLE_BUT_DEPRECATED_MSG NSAttributedString *attributedPrimaryText;

- `


  ### [attributedSecondaryText](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSAutocompletePrediction#/c:objc(cs)GMSAutocompletePrediction(py)attributedSecondaryText)


  ` Deprecated

  Use `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSAutocompleteSuggestion.html` instead.
  The secondary text of a prediction as a NSAttributedString, usually the location of the place.
  E.g. "Sydney, New South Wales, Australia".

  Text ranges that match user input are have a `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Constants/kGMSAutocompleteMatchAttribute.html`, like
  `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSAutocompletePrediction.html#/c:objc(cs)GMSAutocompletePrediction(py)attributedFullText`.

  May be nil.

  #### Declaration

  Swift

      @NSCopying var attributedSecondaryText: NSAttributedString? { get }

  Objective-C

      @property (nonatomic, copy, readonly, nullable) NSAttributedString *attributedSecondaryText;

- `


  ### [placeID](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSAutocompletePrediction#/c:objc(cs)GMSAutocompletePrediction(py)placeID)


  ` Deprecated

  Use `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSAutocompleteSuggestion.html` instead.
  A property representing the place ID of the prediction, suitable for use in a place details
  request.

  #### Declaration

  Swift

      var placeID: String { get }

  Objective-C

      @property (nonatomic, copy, readonly) __GMS_AVAILABLE_BUT_DEPRECATED_MSG NSString *placeID;

- `


  ### [types](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSAutocompletePrediction#/c:objc(cs)GMSAutocompletePrediction(py)types)


  ` Deprecated

  Use `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSAutocompleteSuggestion.html` instead.
  The types of this autocomplete result. Types are NSStrings, valid values are any types
  documented at <https://developers.google.com/places/ios-sdk/supported_types>.

  #### Declaration

  Swift

      var types: [String] { get }

  Objective-C

      @property (nonatomic, copy, readonly) __GMS_AVAILABLE_BUT_DEPRECATED_MSG NSArray<NSString *> *types;

- `


  ### [distanceMeters](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSAutocompletePrediction#/c:objc(cs)GMSAutocompletePrediction(py)distanceMeters)


  ` Deprecated

  Use `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSAutocompleteSuggestion.html` instead.
  The straight line distance in meters between the origin and this prediction if a valid origin is
  specified in the `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSAutocompleteFilter.html` of the request.

  #### Declaration

  Swift

      var distanceMeters: NSNumber? { get }

  Objective-C

      @property (nonatomic, readonly, nullable) NSNumber *distanceMeters;

- `


  ### [-init](https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSAutocompletePrediction#/c:objc(cs)GMSAutocompletePrediction(im)init)


  ` Deprecated

  Use `https://developers.google.com/maps/documentation/places/ios-sdk/reference/objc/Classes/GMSAutocompleteSuggestion.html` instead.
  Unavailable
  Initializer is not available.

  #### Declaration

  Objective-C

      - (nonnull instancetype)init;