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
SDLWeatherServiceData

SDLWeatherServiceData Class Reference

Section Contents

Overview

This data is related to what a weather service would provide.

-initWithLocation:

Convenience init for required parameters.

Objective-C

- (nonnull instancetype)initWithLocation:(nonnull SDLLocationDetails *)location;

Swift

init(location: SDLLocationDetails)

Parameters

location

The location

Return Value

A SDLWeatherServiceData object

-initWithLocation:currentForecast:minuteForecast:hourlyForecast:multidayForecast:alerts:

Convenience init for all parameters.

Objective-C

- (nonnull instancetype)
    initWithLocation:(nonnull SDLLocationDetails *)location
     currentForecast:(nullable SDLWeatherData *)currentForecast
      minuteForecast:(nullable NSArray<SDLWeatherData *> *)minuteForecast
      hourlyForecast:(nullable NSArray<SDLWeatherData *> *)hourlyForecast
    multidayForecast:(nullable NSArray<SDLWeatherData *> *)multidayForecast
              alerts:(nullable NSArray<SDLWeatherAlert *> *)alerts;

Swift

convenience init(location: SDLLocationDetails, currentForecast: SDLWeatherData?, minuteForecast: [SDLWeatherData]?, hourlyForecast: [SDLWeatherData]?, multidayForecast: [SDLWeatherData]?, alerts: [SDLWeatherAlert]?)

Parameters

location

The location

currentForecast

The current forecast

minuteForecast

A minute-by-minute array of forecasts

hourlyForecast

An hour-by-hour array of forecasts

multidayForecast

A day-by-day array of forecasts

alerts

An array of weather alerts

Return Value

A SDLWeatherServiceData object

location

The location.

SDLLocationDetails, Required

Objective-C

@property (nonatomic, strong) SDLLocationDetails *_Nonnull location;

Swift

var location: SDLLocationDetails { get set }

currentForecast

The current forecast.

SDLWeatherData, Optional

Objective-C

@property (nonatomic, strong, nullable) SDLWeatherData *currentForecast;

Swift

var currentForecast: SDLWeatherData? { get set }

minuteForecast

A minute-by-minute array of forecasts.

Array of SDLWeatherData, Optional, minsize=“15” maxsize=“60”

Objective-C

@property (nonatomic, strong, nullable) NSArray<SDLWeatherData *> *minuteForecast;

Swift

var minuteForecast: [SDLWeatherData]? { get set }

hourlyForecast

An hour-by-hour array of forecasts.

Array of SDLWeatherData, Optional, minsize=“1” maxsize=“96”

Objective-C

@property (nonatomic, strong, nullable) NSArray<SDLWeatherData *> *hourlyForecast;

Swift

var hourlyForecast: [SDLWeatherData]? { get set }

multidayForecast

A day-by-day array of forecasts.

Array of SDLWeatherData, Optional, minsize=“1” maxsize=“30”

Objective-C

@property (nonatomic, strong, nullable) NSArray<SDLWeatherData *> *multidayForecast;

Swift

var multidayForecast: [SDLWeatherData]? { get set }

alerts

An array of weather alerts. This array should be ordered with the first object being the current day.

Array of SDLWeatherData, Optional, minsize=“1” maxsize=“10”

Objective-C

@property (nonatomic, strong, nullable) NSArray<SDLWeatherAlert *> *alerts;

Swift

var alerts: [SDLWeatherAlert]? { get set }
View on GitHub.com
Previous Section Next Section