Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
iOS Documentation
SDLWeatherData

SDLWeatherData Class Reference

Section Contents

Overview

Contains information about the current weather

@since RPC 5.1

-initWithCurrentTemperature:temperatureHigh:temperatureLow:apparentTemperature:apparentTemperatureHigh:apparentTemperatureLow:weatherSummary:time:humidity:cloudCover:moonPhase:windBearing:windGust:windSpeed:nearestStormBearing:nearestStormDistance:precipAccumulation:precipIntensity:precipProbability:precipType:visibility:weatherIcon:

Convenience init for all parameters

Objective-C

- (nonnull instancetype)
    initWithCurrentTemperature:(nullable SDLTemperature *)currentTemperature
               temperatureHigh:(nullable SDLTemperature *)temperatureHigh
                temperatureLow:(nullable SDLTemperature *)temperatureLow
           apparentTemperature:(nullable SDLTemperature *)apparentTemperature
       apparentTemperatureHigh:
           (nullable SDLTemperature *)apparentTemperatureHigh
        apparentTemperatureLow:(nullable SDLTemperature *)apparentTemperatureLow
                weatherSummary:(nullable NSString *)weatherSummary
                          time:(nullable SDLDateTime *)time
                      humidity:(nullable NSNumber<SDLFloat> *)humidity
                    cloudCover:(nullable NSNumber<SDLFloat> *)cloudCover
                     moonPhase:(nullable NSNumber<SDLFloat> *)moonPhase
                   windBearing:(nullable NSNumber<SDLInt> *)windBearing
                      windGust:(nullable NSNumber<SDLFloat> *)windGust
                     windSpeed:(nullable NSNumber<SDLFloat> *)windSpeed
           nearestStormBearing:(nullable NSNumber<SDLInt> *)nearestStormBearing
          nearestStormDistance:(nullable NSNumber<SDLInt> *)nearestStormDistance
            precipAccumulation:(nullable NSNumber<SDLFloat> *)precipAccumulation
               precipIntensity:(nullable NSNumber<SDLFloat> *)precipIntensity
             precipProbability:(nullable NSNumber<SDLFloat> *)precipProbability
                    precipType:(nullable NSString *)precipType
                    visibility:(nullable NSNumber<SDLFloat> *)visibility
                   weatherIcon:(nullable SDLImage *)weatherIcon;

Swift

init(currentTemperature: SDLTemperature?, temperatureHigh: SDLTemperature?, temperatureLow: SDLTemperature?, apparentTemperature: SDLTemperature?, apparentTemperatureHigh: SDLTemperature?, apparentTemperatureLow: SDLTemperature?, weatherSummary: String?, time: SDLDateTime?, humidity: (NSNumber & SDLFloat)?, cloudCover: (NSNumber & SDLFloat)?, moonPhase: (NSNumber & SDLFloat)?, windBearing: (NSNumber & SDLInt)?, windGust: (NSNumber & SDLFloat)?, windSpeed: (NSNumber & SDLFloat)?, nearestStormBearing: (NSNumber & SDLInt)?, nearestStormDistance: (NSNumber & SDLInt)?, precipAccumulation: (NSNumber & SDLFloat)?, precipIntensity: (NSNumber & SDLFloat)?, precipProbability: (NSNumber & SDLFloat)?, precipType: String?, visibility: (NSNumber & SDLFloat)?, weatherIcon: SDLImage?)

Parameters

currentTemperature

The current temperature

temperatureHigh

The predicted high temperature for the day

temperatureLow

The predicted low temperature for the day

apparentTemperature

The apparent temperature

apparentTemperatureHigh

The predicted high apparent temperature for the day

apparentTemperatureLow

The predicted low apparent temperature for the day

weatherSummary

A summary of the weather

time

The time this data refers to

humidity

From 0 to 1, percentage humidity

cloudCover

From 0 to 1, percentage cloud cover

moonPhase

From 0 to 1, percentage of the moon seen, e.g. 0 = no moon, 0.25 = quarter moon

windBearing

In degrees, true north at 0 degrees

windGust

In km/hr

windSpeed

In km/hr

nearestStormBearing

In degrees, true north at 0 degrees

nearestStormDistance

In km

precipAccumulation

In cm

precipIntensity

In cm of water per hour

precipProbability

From 0 to 1, percentage chance

precipType

A description of the precipitation type (e.g. “rain”, “snow”, “sleet”, “hail”)

visibility

In km

weatherIcon

The weather icon image

Return Value

A SDLWeatherData object

currentTemperature

The current temperature.

SDLTemperature, Optional

Objective-C

@property (nonatomic, strong, nullable) SDLTemperature *currentTemperature;

Swift

var currentTemperature: SDLTemperature? { get set }

temperatureHigh

The predicted high temperature for the day.

SDLTemperature, Optional

Objective-C

@property (nonatomic, strong, nullable) SDLTemperature *temperatureHigh;

Swift

var temperatureHigh: SDLTemperature? { get set }

temperatureLow

The predicted low temperature for the day.

SDLTemperature, Optional

Objective-C

@property (nonatomic, strong, nullable) SDLTemperature *temperatureLow;

Swift

var temperatureLow: SDLTemperature? { get set }

apparentTemperature

The apparent temperature.

SDLTemperature, Optional

Objective-C

@property (nonatomic, strong, nullable) SDLTemperature *apparentTemperature;

Swift

var apparentTemperature: SDLTemperature? { get set }

apparentTemperatureHigh

The predicted high apparent temperature for the day.

SDLTemperature, Optional

Objective-C

@property (nonatomic, strong, nullable) SDLTemperature *apparentTemperatureHigh;

Swift

var apparentTemperatureHigh: SDLTemperature? { get set }

apparentTemperatureLow

The predicted low apparent temperature for the day.

SDLTemperature, Optional

Objective-C

@property (nonatomic, strong, nullable) SDLTemperature *apparentTemperatureLow;

Swift

var apparentTemperatureLow: SDLTemperature? { get set }

weatherSummary

A summary of the weather.

String, Optional

Objective-C

@property (nonatomic, strong, nullable) NSString *weatherSummary;

Swift

var weatherSummary: String? { get set }

time

The time this data refers to.

SDLDateTime, Optional

Objective-C

@property (nonatomic, strong, nullable) SDLDateTime *time;

Swift

var time: SDLDateTime? { get set }

humidity

From 0 to 1, percentage humidity.

Float, Optional, minvalue=“0” maxvalue=“1”

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLFloat> *humidity;

Swift

var humidity: (NSNumber & SDLFloat)? { get set }

cloudCover

From 0 to 1, percentage cloud cover.

Float, Optional, minvalue=“0” maxvalue=“1”

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLFloat> *cloudCover;

Swift

var cloudCover: (NSNumber & SDLFloat)? { get set }

moonPhase

From 0 to 1, percentage of the moon seen, e.g. 0 = no moon, 0.25 = quarter moon

Float, Optional, minvalue=“0” maxvalue=“1”

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLFloat> *moonPhase;

Swift

var moonPhase: (NSNumber & SDLFloat)? { get set }

windBearing

In degrees, true north at 0 degrees.

Integer, Optional

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLInt> *windBearing;

Swift

var windBearing: (NSNumber & SDLInt)? { get set }

windGust

In km/hr

Float, Optional

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLFloat> *windGust;

Swift

var windGust: (NSNumber & SDLFloat)? { get set }

windSpeed

In km/hr

Float, Optional

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLFloat> *windSpeed;

Swift

var windSpeed: (NSNumber & SDLFloat)? { get set }

nearestStormBearing

In degrees, true north at 0 degrees.

Integer, Optional

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLInt> *nearestStormBearing;

Swift

var nearestStormBearing: (NSNumber & SDLInt)? { get set }

nearestStormDistance

In km

Integer, Optional

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLInt> *nearestStormDistance;

Swift

var nearestStormDistance: (NSNumber & SDLInt)? { get set }

precipAccumulation

In cm

Float, Optional

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLFloat> *precipAccumulation;

Swift

var precipAccumulation: (NSNumber & SDLFloat)? { get set }

precipIntensity

In cm of water per hour.

Float, Optional

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLFloat> *precipIntensity;

Swift

var precipIntensity: (NSNumber & SDLFloat)? { get set }

precipProbability

From 0 to 1, percentage chance.

Float, Optional, minvalue=“0” maxvalue=“1”

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLFloat> *precipProbability;

Swift

var precipProbability: (NSNumber & SDLFloat)? { get set }

precipType

A description of the precipitation type (e.g. “rain”, “snow”, “sleet”, “hail”)

String, Optional

Objective-C

@property (nonatomic, strong, nullable) NSString *precipType;

Swift

var precipType: String? { get set }

visibility

In km

Float, Optional

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLFloat> *visibility;

Swift

var visibility: (NSNumber & SDLFloat)? { get set }

weatherIcon

The weather icon image.

SDLImage, Optional

Objective-C

@property (nonatomic, strong, nullable) SDLImage *weatherIcon;

Swift

var weatherIcon: SDLImage? { get set }
View on GitHub.com
Previous Section Next Section