Warning

This feature is available in the Full MapKit SDK version

MMKSearchAddress

@interface MMKSearchAddress : NSObject

Contains structured address, formatted address, postal code and country code.

Structured address is an ordered list of components (usually administrative hierarchy). Formatted address is a full address as a single string. Formatted address generally can't be obtained from component names. Some components could be ignored (large administrative region) or absent (office number).

Summary

Class methods

+ (nonnull MMKSearchAddress *)addressWithFormattedAddress:(nonnull NSString *)formattedAddress
                                           additionalInfo:(nullable NSString *)additionalInfo
                                               postalCode:(nullable NSString *)postalCode
                                              countryCode:(nullable NSString *)countryCode
                                               components:(nonnull NSArray<MMKSearchAddressComponent *> *)components;

Properties

@property (nonatomic, readonly, nonnull) NSString *formattedAddress;
Human-readable address

@property (nonatomic, readonly, nullable) NSString *additionalInfo;
Additional address info

@property (nonatomic, readonly, nullable) NSString *postalCode;
Postal/Zip code

@property (nonatomic, readonly, nullable) NSString *countryCode;
Country code in ISO 3166-1 alpha-2 format (two-letter country code)

@property (nonatomic, readonly, nonnull)
    NSArray<MMKSearchAddressComponent *> *components;

Address component list, see MMKSearchAddressComponent, may be empty

Class methods

addressWithFormattedAddress:additionalInfo:postalCode:countryCode:components:

+ (nonnull MMKSearchAddress *)addressWithFormattedAddress:(nonnull NSString *)formattedAddress
                                           additionalInfo:(nullable NSString *)additionalInfo
                                               postalCode:(nullable NSString *)postalCode
                                              countryCode:(nullable NSString *)countryCode
                                               components:(nonnull NSArray<MMKSearchAddressComponent *> *)components;


Properties

formattedAddress

@property (nonatomic, readonly, nonnull) NSString *formattedAddress;

Human-readable address.


additionalInfo

@property (nonatomic, readonly, nullable) NSString *additionalInfo;

Additional address info.

Optional field, can be nil.


postalCode

@property (nonatomic, readonly, nullable) NSString *postalCode;

Postal/Zip code.

Optional field, can be nil.


countryCode

@property (nonatomic, readonly, nullable) NSString *countryCode;

Country code in ISO 3166-1 alpha-2 format (two-letter country code).

Optional field, can be nil.


components

@property (nonatomic, readonly, nonnull)
    NSArray<MMKSearchAddressComponent *> *components;

Address component list, see MMKSearchAddressComponent, may be empty.