GooglePlaces Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMSAddressComponent
@interface GMSAddressComponent : NSObject
Represents a component of an address, e.g., street number, postcode, city, etc.
-
Deprecated
type property is deprecated in favor of types
Declaration
Swift
var type: String { get }
Objective-C
@property (nonatomic, copy, readonly) __GMS_AVAILABLE_BUT_DEPRECATED_MSG NSString *type;
-
Declaration
Swift
var types: [String] { get }
Objective-C
@property (nonatomic, strong, readonly) NSArray<NSString *> *_Nonnull types;
-
Name of the address component, e.g. “Sydney”
Declaration
Swift
var name: String { get }
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull name;
-
Short name of the address component, e.g. “AU”
Declaration
Swift
var shortName: String? { get }
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nullable shortName;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMSAddressComponent\u003c/code\u003e represents parts of an address like street number, city, or postcode.\u003c/p\u003e\n"],["\u003cp\u003eIt provides the component's name (e.g., "Sydney"), type (e.g., "locality"), and potentially a short name (e.g., "AU").\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003etype\u003c/code\u003e property is deprecated; use \u003ccode\u003etypes\u003c/code\u003e instead for an array of type constants from \u003ccode\u003eGMSPlaceTypes.h\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eYou can find supported type values at: \u003ca href=\"https://developers.google.com/places/ios-sdk/supported_types#table2\"\u003ehttps://developers.google.com/places/ios-sdk/supported_types#table2\u003c/a\u003e.\u003c/p\u003e\n"]]],[],null,["# GooglePlaces Framework Reference\n\nGMSAddressComponent\n===================\n\n @interface GMSAddressComponent : NSObject\n\nRepresents a component of an address, e.g., street number, postcode, city, etc.\n- `\n ``\n ``\n `\n\n ### [type](#/c:objc(cs)GMSAddressComponent(py)type)\n\n `\n ` \n Deprecated\n\n type property is deprecated in favor of types \n Type of the address component. For a list of supported types, see\n \u003chttps://developers.google.com/places/ios-sdk/supported_types#table2\u003e. This string will be one\n of the constants defined in GMSPlaceTypes.h. \n\n #### Declaration\n\n Swift \n\n var type: String { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly) __GMS_AVAILABLE_BUT_DEPRECATED_MSG NSString *type;\n\n- `\n ``\n ``\n `\n\n ### [types](#/c:objc(cs)GMSAddressComponent(py)types)\n\n `\n ` \n Types associated with the address component. For a list of supported types, see\n \u003chttps://developers.google.com/places/ios-sdk/supported_types#table2\u003e. This array will contain\n one or more of the constants strings defined in GMSPlaceTypes.h. \n\n #### Declaration\n\n Swift \n\n var types: [String] { get }\n\n Objective-C \n\n @property (nonatomic, strong, readonly) NSArray\u003cNSString *\u003e *_Nonnull types;\n\n- `\n ``\n ``\n `\n\n ### [name](#/c:objc(cs)GMSAddressComponent(py)name)\n\n `\n ` \n Name of the address component, e.g. \"Sydney\" \n\n #### Declaration\n\n Swift \n\n var name: String { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly) NSString *_Nonnull name;\n\n- `\n ``\n ``\n `\n\n ### [shortName](#/c:objc(cs)GMSAddressComponent(py)shortName)\n\n `\n ` \n Short name of the address component, e.g. \"AU\" \n\n #### Declaration\n\n Swift \n\n var shortName: String? { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly) NSString *_Nullable shortName;"]]