AWFAdvisory

Objective-C

@interface AWFAdvisory : AWFGeographicObject

Swift

class AWFAdvisory : AWFGeographicObject

An AWFAdvisory object represents data returned by the alerts endpoint of the Aeris Weather API.

  • Data source for the alert.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *dataSource;

    Swift

    var dataSource: String? { get set }
  • Valid-time event code (VTEC) for the advisory.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *type;

    Swift

    var type: String? { get set }
  • Type name of the advisory.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *name;

    Swift

    var name: String? { get set }
  • Weather zone for the advisory.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *zone;

    Swift

    var zone: String? { get set }
  • Shortened and formatted version of the advisory body text.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *body;

    Swift

    var body: String? { get set }
  • Complete, unmodified version of the advisory body text including raw headers.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *bodyFull;

    Swift

    var bodyFull: String? { get set }
  • Color used for the alert which corresponds to the AMP Alert types/colors. See https://www.aerisweather.com/support/docs/aeris-maps/reference/alert-types/

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) UIColor *color;

    Swift

    @NSCopying var color: UIColor? { get set }
  • Default category of the alert type. May be null for non common alerts.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *category;

    Swift

    var category: String? { get set }
  • A Boolean value that indicates whether this is an emergency-specific alert, such as a tornado emergency.

    Declaration

    Objective-C

    @property (nonatomic) BOOL isEmergency;

    Swift

    var isEmergency: Bool { get set }
  • GMT date when the advisory was issued.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSDate *issued;

    Swift

    var issued: Date? { get set }
  • GMT date when the advisory goes into effect.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSDate *begins;

    Swift

    var begins: Date? { get set }
  • GMT date when the advisory expires.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSDate *expires;

    Swift

    var expires: Date? { get set }
  • GMT date when the advisory was stored.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSDate *added;

    Swift

    var added: Date? { get set }
  • GMT date when the advisory was updated.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSDate *updated;

    Swift

    var updated: Date? { get set }
  • For US alerts, value will be a list of US counties in the XXC### format, where XX is the state abbreviation and ### is the 3-digit county fips number. For non-US alerts, value will be nil.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSArray<NSString *> *_Nonnull includedCounties;

    Swift

    var includedCounties: [String] { get set }
  • For US alerts, this value will be a list of US counties in the XX### format, where XX is the state two digit fips number and ### is the 3-digit county fips number. For non-US alerts, value will be nil.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSArray<NSString *> *_Nonnull includedFipsCodes;

    Swift

    var includedFipsCodes: [String] { get set }
  • If a US alert will be a list of US public weather zones in the NOAA XXZ### format, where XX is the state abbreviation and ### is the 3-digit public zone identifier. For Canadian alerts, this value will be a list of Canadian location codes (CLCs).

    Declaration

    Objective-C

    @property (nonatomic, strong) NSArray<NSString *> *_Nonnull includedWeatherZones;

    Swift

    var includedWeatherZones: [String] { get set }
  • For US-based alerts, this value is a list of US zip codes that are affected by the alert. Only US zip codes, where the zip code centroid are within the alert, including any small polygon, will be returned.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSArray<NSNumber *> *_Nonnull includedZipCodes;

    Swift

    var includedZipCodes: [NSNumber] { get set }
  • A comma-delimited string of coordinates (longitude, latitude) defining the boundary for the advisory. * Typically this is only used for certain short-fuse advisories, such as tornado and severe thunderstorm warnings.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *polygon;

    Swift

    var polygon: String? { get set }
  • A AWFGeoPolygon instance created from the string of coordinates found in polygon, if any.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) AWFGeoPolygon *geoPolygon;

    Swift

    var geoPolygon: AWFGeoPolygon? { get }
  • Returns a dictionary of UIColor instances mapped to their respective advisory VTEC codes. This is the standard advisory color associations used by the National Weather Service (NWS) and those used with the advisory map overlay.

    Declaration

    Objective-C

    + (nonnull NSDictionary<NSString *, UIColor *> *)colorMappingsForTypes;

    Swift

    class func colorMappingsForTypes() -> [String : UIColor]
  • Returns a dictionary of advisory names mapped to their respective advisory VTEC codes.

    Declaration

    Objective-C

    + (nonnull NSDictionary<NSString *, NSString *> *)namesByType;

    Swift

    class func namesByType() -> [String : String]
  • Returns the standard color associated with the specific advisory VTEC code.

    Declaration

    Objective-C

    + (nullable UIColor *)colorForAdvisoryWithType:(nonnull NSString *)type;

    Swift

    class func colorForAdvisory(withType type: String) -> UIColor?

    Parameters

    type

    The advisory VTEC code to return the color for

    Return Value

    A UIColor instance for the advisory type