One Logo Pool Ball
App Services · IOS API REFERENCE

WeatherKit

Deliver weather conditions and alerts to your users.

103 types

465 callable entries

12 skipped

97% entry coverage

Generated from iOS SDK 27.1. Availability is shown on each declaration; permissions and entitlements still apply.

Types

CloudCoverByAltitude

struct · iOS 18.0+

CurrentWeather

struct · iOS 16.0+

DailyWeatherStatistics

struct · iOS 18.0+

DailyWeatherStatistics.Element

typealias · iOS 18.0+

DailyWeatherStatistics.Index

typealias · iOS 18.0+

DailyWeatherStatistics.Indices

typealias · iOS 18.0+

DailyWeatherStatistics.Iterator

typealias · iOS 18.0+

DailyWeatherStatistics.SubSequence

typealias · iOS 18.0+

DailyWeatherStatisticsQuery

struct · iOS 18.0+

DailyWeatherSummary

struct · iOS 18.0+

DailyWeatherSummary.Element

typealias · iOS 18.0+

DailyWeatherSummary.Index

typealias · iOS 18.0+

DailyWeatherSummary.Indices

typealias · iOS 18.0+

DailyWeatherSummary.Iterator

typealias · iOS 18.0+

DailyWeatherSummary.SubSequence

typealias · iOS 18.0+

DailyWeatherSummaryQuery

struct · iOS 18.0+

DayPartForecast

struct · iOS 18.0+

DayPrecipitationStatistics

struct · iOS 18.0+

DayPrecipitationSummary

struct · iOS 18.0+

DayTemperatureStatistics

struct · iOS 18.0+

DayTemperatureSummary

struct · iOS 18.0+

DayWeather

struct · iOS 16.0+

Deviation

enum · iOS 18.0+

Forecast

struct · iOS 16.0+

Forecast.Index

typealias · iOS 16.0+

Forecast.Indices

typealias · iOS 16.0+

Forecast.Iterator

typealias · iOS 16.0+

Forecast.SubSequence

typealias · iOS 16.0+

HistoricalComparison

enum · iOS 18.0+

HistoricalComparisons

struct · iOS 18.0+

HistoricalComparisons.Element

typealias · iOS 18.0+

HistoricalComparisons.Index

typealias · iOS 18.0+

HistoricalComparisons.Indices

typealias · iOS 18.0+

HistoricalComparisons.Iterator

typealias · iOS 18.0+

HistoricalComparisons.SubSequence

typealias · iOS 18.0+

HourlyWeatherStatistics

struct · iOS 18.0+

HourlyWeatherStatistics.Element

typealias · iOS 18.0+

HourlyWeatherStatistics.Index

typealias · iOS 18.0+

HourlyWeatherStatistics.Indices

typealias · iOS 18.0+

HourlyWeatherStatistics.Iterator

typealias · iOS 18.0+

HourlyWeatherStatistics.SubSequence

typealias · iOS 18.0+

HourlyWeatherStatisticsQuery

struct · iOS 18.0+

HourTemperatureStatistics

struct · iOS 18.0+

HourWeather

struct · iOS 16.0+

MinuteWeather

struct · iOS 16.0+

MonthlyWeatherStatistics

struct · iOS 18.0+

MonthlyWeatherStatistics.Element

typealias · iOS 18.0+

MonthlyWeatherStatistics.Index

typealias · iOS 18.0+

MonthlyWeatherStatistics.Indices

typealias · iOS 18.0+

MonthlyWeatherStatistics.Iterator

typealias · iOS 18.0+

MonthlyWeatherStatistics.SubSequence

typealias · iOS 18.0+

MonthlyWeatherStatisticsQuery

struct · iOS 18.0+

MonthPrecipitationStatistics

struct · iOS 18.0+

MonthTemperatureStatistics

struct · iOS 18.0+

MoonEvents

struct · iOS 16.0+

MoonPhase

enum · iOS 16.0+

MoonPhase.AllCases

typealias · iOS 16.0+

MoonPhase.RawValue

typealias · iOS 16.0+

Percentiles

struct · iOS 18.0+

Precipitation

enum · iOS 16.0+

Precipitation.AllCases

typealias · iOS 16.0+

Precipitation.RawValue

typealias · iOS 16.0+

PrecipitationAmountByType

struct · iOS 18.0+

PressureTrend

enum · iOS 16.0+

PressureTrend.AllCases

typealias · iOS 16.0+

PressureTrend.RawValue

typealias · iOS 16.0+

SnowfallAmount

struct · iOS 18.0+

SunEvents

struct · iOS 16.0+

Trend

struct · iOS 18.0+

TrendBaseline

struct · iOS 18.0+

TrendBaseline.Kind

enum · iOS 18.0+

UVIndex

struct · iOS 16.0+

UVIndex.ExposureCategory

enum · iOS 16.0+

UVIndex.ExposureCategory.AllCases

typealias · iOS 16.0+

UVIndex.ExposureCategory.RawValue

typealias · iOS 16.0+

Weather

struct · iOS 16.0+

WeatherAlert

struct · iOS 16.0+

WeatherAttribution

struct · iOS 16.0+

WeatherAvailability

struct · iOS 16.0+

WeatherAvailability.AvailabilityKind

enum · iOS 16.0+

WeatherAvailability.AvailabilityKind.RawValue

typealias · iOS 16.0+

WeatherChange

struct · iOS 18.0+

WeatherChange.Direction

enum · iOS 18.0+

WeatherChanges

struct · iOS 18.0+

WeatherChanges.Element

typealias · iOS 18.0+

WeatherChanges.Index

typealias · iOS 18.0+

WeatherChanges.Indices

typealias · iOS 18.0+

WeatherChanges.Iterator

typealias · iOS 18.0+

WeatherChanges.SubSequence

typealias · iOS 18.0+

WeatherCondition

enum · iOS 16.0+

WeatherCondition.AllCases

typealias · iOS 16.0+

WeatherCondition.RawValue

typealias · iOS 16.0+

WeatherError

enum · iOS 16.0+

WeatherMetadata

struct · iOS 16.0+

WeatherQuery

struct · iOS 16.0+

WeatherService

class · iOS 16.0+

WeatherSeverity

enum · iOS 16.0+

WeatherSeverity.AllCases

typealias · iOS 16.0+

WeatherSeverity.RawValue

typealias · iOS 16.0+

Wind

struct · iOS 16.0+

Wind.CompassDirection

enum · iOS 16.0+

Wind.CompassDirection.AllCases

typealias · iOS 16.0+

Wind.CompassDirection.RawValue

typealias · iOS 16.0+

Functions and constants

get · iOS 18.0+

startIndex

TypeScript
get startIndex(): number
Swift declaration
var startIndex: DailyWeatherStatistics<T>.Index { get }

The start index for the daily weather statistics.

get · iOS 18.0+

baselineStartDate

TypeScript
get baselineStartDate(): globalThis.Date
Swift declaration
var baselineStartDate: Date

The year the statistics collection began.

set · iOS 18.0+

baselineStartDate

TypeScript
set baselineStartDate(value: globalThis.Date)
Swift declaration
var baselineStartDate: Date

The year the statistics collection began.

get · iOS 18.0+

days

TypeScript
get days(): Array<number>
Swift declaration
var days: [T]

An ordered collection of day weather statistics data of type `T`, for each requested day.

set · iOS 18.0+

days

TypeScript
set days(value: Array<number>)
Swift declaration
var days: [T]

An ordered collection of day weather statistics data of type `T`, for each requested day.

get · iOS 18.0+

endIndex

TypeScript
get endIndex(): number
Swift declaration
var endIndex: DailyWeatherStatistics<T>.Index { get }

The end index for the daily weather statistics.

get · iOS 18.0+

metadata

TypeScript
get metadata(): WeatherMetadata
Swift declaration
var metadata: WeatherMetadata

Descriptive information about the weather statistics data.

set · iOS 18.0+

metadata

TypeScript
set metadata(value: WeatherMetadata)
Swift declaration
var metadata: WeatherMetadata

Descriptive information about the weather statistics data.

subscript · iOS 18.0+

subscript

TypeScript
subscript(position: number): number
Swift declaration
subscript(position: DailyWeatherStatistics<T>.Index) -> DailyWeatherStatistics<T>.Element { get }

The day weather statistics at the provided index.

get · iOS 18.0+

temperature

TypeScript
static get temperature(): DailyWeatherSummaryQuery<DayTemperatureSummary>
Swift declaration
static var temperature: DailyWeatherSummaryQuery<DayTemperatureSummary> { get }

The daily temperature summary query.

get · iOS 18.0+

precipitation

TypeScript
static get precipitation(): DailyWeatherSummaryQuery<DayPrecipitationSummary>
Swift declaration
static var precipitation: DailyWeatherSummaryQuery<DayPrecipitationSummary> { get }

The daily precipitation summary query.

get · iOS 18.0+

temperature

TypeScript
static get temperature(): DailyWeatherStatisticsQuery<DayTemperatureStatistics>
Swift declaration
static var temperature: DailyWeatherStatisticsQuery<DayTemperatureStatistics> { get }

The daily temperature statistics query.

get · iOS 18.0+

precipitation

TypeScript
static get precipitation(): DailyWeatherStatisticsQuery<DayPrecipitationStatistics>
Swift declaration
static var precipitation: DailyWeatherStatisticsQuery<DayPrecipitationStatistics> { get }

The daily precipitation statistics query.

get · iOS 18.0+

startIndex

TypeScript
get startIndex(): number
Swift declaration
var startIndex: DailyWeatherSummary<T>.Index { get }

The start index for the daily weather summaries.

get · iOS 18.0+

days

TypeScript
get days(): Array<number>
Swift declaration
var days: [T]

An ordered collection of day weather summaries of type `T`, for each requested day.

set · iOS 18.0+

days

TypeScript
set days(value: Array<number>)
Swift declaration
var days: [T]

An ordered collection of day weather summaries of type `T`, for each requested day.

get · iOS 18.0+

endIndex

TypeScript
get endIndex(): number
Swift declaration
var endIndex: DailyWeatherSummary<T>.Index { get }

The end index for the daily weather summaries.

get · iOS 18.0+

metadata

TypeScript
get metadata(): WeatherMetadata
Swift declaration
var metadata: WeatherMetadata

Descriptive information about the weather statistics data.

set · iOS 18.0+

metadata

TypeScript
set metadata(value: WeatherMetadata)
Swift declaration
var metadata: WeatherMetadata

Descriptive information about the weather statistics data.

subscript · iOS 18.0+

subscript

TypeScript
subscript(position: number): number
Swift declaration
subscript(position: DailyWeatherSummary<T>.Index) -> DailyWeatherSummary<T>.Element { get }

The day weather summary at the provided index.

get · iOS 18.0+

startIndex

TypeScript
get startIndex(): number
Swift declaration
var startIndex: HourlyWeatherStatistics<T>.Index { get }

The start index for the hourly weather statistics.

get · iOS 18.0+

baselineStartDate

TypeScript
get baselineStartDate(): globalThis.Date
Swift declaration
var baselineStartDate: Date

The date when the statistics collection began.

set · iOS 18.0+

baselineStartDate

TypeScript
set baselineStartDate(value: globalThis.Date)
Swift declaration
var baselineStartDate: Date

The date when the statistics collection began.

get · iOS 18.0+

hours

TypeScript
get hours(): Array<number>
Swift declaration
var hours: [T]

An ordered collection of hour weather statistics data of type `T`, for each requested hour.

set · iOS 18.0+

hours

TypeScript
set hours(value: Array<number>)
Swift declaration
var hours: [T]

An ordered collection of hour weather statistics data of type `T`, for each requested hour.

get · iOS 18.0+

endIndex

TypeScript
get endIndex(): number
Swift declaration
var endIndex: HourlyWeatherStatistics<T>.Index { get }

The end index for the hourly weather statistics.

get · iOS 18.0+

metadata

TypeScript
get metadata(): WeatherMetadata
Swift declaration
var metadata: WeatherMetadata

Descriptive information about the weather statistics data.

set · iOS 18.0+

metadata

TypeScript
set metadata(value: WeatherMetadata)
Swift declaration
var metadata: WeatherMetadata

Descriptive information about the weather statistics data.

subscript · iOS 18.0+

subscript

TypeScript
subscript(position: number): number
Swift declaration
subscript(position: HourlyWeatherStatistics<T>.Index) -> HourlyWeatherStatistics<T>.Element { get }

The hour weather statistics at the provided index.

get · iOS 18.0+

temperature

TypeScript
static get temperature(): HourlyWeatherStatisticsQuery<HourTemperatureStatistics>
Swift declaration
static var temperature: HourlyWeatherStatisticsQuery<HourTemperatureStatistics> { get }

The hourly temperature statistics query.

get · iOS 18.0+

startIndex

TypeScript
get startIndex(): number
Swift declaration
var startIndex: MonthlyWeatherStatistics<T>.Index { get }

The start index for the monthly weather statistics.

get · iOS 18.0+

baselineStartDate

TypeScript
get baselineStartDate(): globalThis.Date
Swift declaration
var baselineStartDate: Date

The year the statistics collection began.

set · iOS 18.0+

baselineStartDate

TypeScript
set baselineStartDate(value: globalThis.Date)
Swift declaration
var baselineStartDate: Date

The year the statistics collection began.

get · iOS 18.0+

months

TypeScript
get months(): Array<number>
Swift declaration
var months: [T]

An ordered collection of month weather statistics data of type `T`, for each requested month.

set · iOS 18.0+

months

TypeScript
set months(value: Array<number>)
Swift declaration
var months: [T]

An ordered collection of month weather statistics data of type `T`, for each requested month.

get · iOS 18.0+

endIndex

TypeScript
get endIndex(): number
Swift declaration
var endIndex: MonthlyWeatherStatistics<T>.Index { get }

The end index for the monthly weather statistics.

get · iOS 18.0+

metadata

TypeScript
get metadata(): WeatherMetadata
Swift declaration
var metadata: WeatherMetadata

Descriptive information about the weather statistics data.

set · iOS 18.0+

metadata

TypeScript
set metadata(value: WeatherMetadata)
Swift declaration
var metadata: WeatherMetadata

Descriptive information about the weather statistics data.

subscript · iOS 18.0+

subscript

TypeScript
subscript(position: number): number
Swift declaration
subscript(position: MonthlyWeatherStatistics<T>.Index) -> MonthlyWeatherStatistics<T>.Element { get }

The month weather statistics at the provided index.

get · iOS 18.0+

temperature

TypeScript
static get temperature(): MonthlyWeatherStatisticsQuery<MonthTemperatureStatistics>
Swift declaration
static var temperature: MonthlyWeatherStatisticsQuery<MonthTemperatureStatistics> { get }

The monthly temperature statistics query.

get · iOS 18.0+

precipitation

TypeScript
static get precipitation(): MonthlyWeatherStatisticsQuery<MonthPrecipitationStatistics>
Swift declaration
static var precipitation: MonthlyWeatherStatisticsQuery<MonthPrecipitationStatistics> { get }

The monthly precipitation statistics query.

get · iOS 16.0+

availability

TypeScript
static get availability(): WeatherQuery<WeatherAvailability>
Swift declaration
static var availability: WeatherQuery<WeatherAvailability> { get }

The availability query.

get · iOS 18.0+

historicalComparisons

TypeScript
static get historicalComparisons(): WeatherQuery<(HistoricalComparisons) | null>
Swift declaration
static var historicalComparisons: WeatherQuery<HistoricalComparisons?> { get }

The weather historical comparison query.

get · iOS 16.0+

daily

TypeScript
static get daily(): WeatherQuery<Forecast<DayWeather>>
Swift declaration
static var daily: WeatherQuery<Forecast<DayWeather>> { get }

The daily forecast query. This returns 10 contiguous days, beginning with the current day.

get · iOS 16.0+

alerts

TypeScript
static get alerts(): WeatherQuery<(Array<WeatherAlert>) | null>
Swift declaration
static var alerts: WeatherQuery<[WeatherAlert]?> { get }

The weather alerts query.

get · iOS 16.0+

hourly

TypeScript
static get hourly(): WeatherQuery<Forecast<HourWeather>>
Swift declaration
static var hourly: WeatherQuery<Forecast<HourWeather>> { get }

The hourly forecast query. This returns 25 contiguous hours, beginning with the current hour.

get · iOS 16.0+

minute

TypeScript
static get minute(): WeatherQuery<(Forecast<MinuteWeather>) | null>
Swift declaration
static var minute: WeatherQuery<Forecast<MinuteWeather>?> { get }

The minute forecast query.

get · iOS 18.0+

changes

TypeScript
static get changes(): WeatherQuery<(WeatherChanges) | null>
Swift declaration
static var changes: WeatherQuery<WeatherChanges?> { get }

The weather changes query.

get · iOS 16.0+

current

TypeScript
static get current(): WeatherQuery<CurrentWeather>
Swift declaration
static var current: WeatherQuery<CurrentWeather> { get }

The current weather query.

static · iOS 16.0+

daily

TypeScript
static dailyStartDateEndDate(startDate: globalThis.Date, endDate: globalThis.Date): WeatherQuery<Forecast<DayWeather>>
Swift declaration
static func daily(startDate: Date, endDate: Date) -> WeatherQuery<T>

Returns weather for an arbitrary range of days, with the following caveats: * Historical data is available from Aug 1, 2021. * Forecasts are available up to 10 days in the future. * Each request will return a maximum of 10 days. * A day is included in the forecast if midnight in local time is included in the range of `startDate` (inclusive) to `endDate` (exclusive). - Parameters: - startDate: the lower boundary of the time range for the forecast (inclusive) - endDate: the upper boundary of the time range for the forecast (exclusive) - Returns: a daily forecast query for the specified time range

static · iOS 16.0+

hourly

TypeScript
static hourlyStartDateEndDate(startDate: globalThis.Date, endDate: globalThis.Date): WeatherQuery<Forecast<HourWeather>>
Swift declaration
static func hourly(startDate: Date, endDate: Date) -> WeatherQuery<T>

The hourly forecast query that takes a start date and end date for the request, with the following caveats: * Historical data is available from Aug 1, 2021. * Forecasts are available up to 10 days (~240 hours) in the future. * Each request will return a maximum of 10 days (~240 hours). * Hours in the forecast range from `startDate`(inclussive) to `endDate` (exclusive) - Parameters: - startDate: the lower boundary of the time range for the forecast (inclusive) - endDate: the upper boundary of the time range for the forecast (exclusive) - Returns: an hourly forecast query for the specified time range

get · iOS 18.0+

p10

TypeScript
get p10(): _Foundation_Measurement<unknown>
Swift declaration
var p10: Measurement<Dimension>

10% of the distribution is less than this value.

set · iOS 18.0+

p10

TypeScript
set p10(value: _Foundation_Measurement<unknown>)
Swift declaration
var p10: Measurement<Dimension>

10% of the distribution is less than this value.

get · iOS 18.0+

p50

TypeScript
get p50(): _Foundation_Measurement<unknown>
Swift declaration
var p50: Measurement<Dimension>

50% of the distribution is less than this value.

set · iOS 18.0+

p50

TypeScript
set p50(value: _Foundation_Measurement<unknown>)
Swift declaration
var p50: Measurement<Dimension>

50% of the distribution is less than this value.

get · iOS 18.0+

p90

TypeScript
get p90(): _Foundation_Measurement<unknown>
Swift declaration
var p90: Measurement<Dimension>

90% of the distribution is less than this value.

set · iOS 18.0+

p90

TypeScript
set p90(value: _Foundation_Measurement<unknown>)
Swift declaration
var p90: Measurement<Dimension>

90% of the distribution is less than this value.

get · iOS 18.0+

kind

TypeScript
get kind(): TrendBaseline_Kind<unknown>
Swift declaration
let kind: TrendBaseline<Dimension>.Kind

The manner in which the comparison between the baseline and current values are compared.

get · iOS 18.0+

value

TypeScript
get value(): _Foundation_Measurement<unknown>
Swift declaration
let value: Measurement<Dimension>

The recorded baseline value for the condition in which the trend is comparing to.

get · iOS 18.0+

startDate

TypeScript
get startDate(): globalThis.Date
Swift declaration
let startDate: Date

The year the statistics collection began.

get · iOS 18.0+

currentValue

TypeScript
get currentValue(): _Foundation_Measurement<unknown>
Swift declaration
var currentValue: Measurement<Dimension>

The current recorded value for the condition in which the trend is compared against.

set · iOS 18.0+

currentValue

TypeScript
set currentValue(value: _Foundation_Measurement<unknown>)
Swift declaration
var currentValue: Measurement<Dimension>

The current recorded value for the condition in which the trend is compared against.

get · iOS 18.0+

baseline

TypeScript
get baseline(): TrendBaseline<unknown>
Swift declaration
var baseline: TrendBaseline<Dimension>

The manner in which the comparison between the baseline and current values are compared.

set · iOS 18.0+

baseline

TypeScript
set baseline(value: TrendBaseline<unknown>)
Swift declaration
var baseline: TrendBaseline<Dimension>

The manner in which the comparison between the baseline and current values are compared.

get · iOS 18.0+

deviation

TypeScript
get deviation(): Deviation
Swift declaration
var deviation: Deviation

Semantically describes the manner in which the observed trend compares the current value against the baseline value.

set · iOS 18.0+

deviation

TypeScript
set deviation(value: Deviation)
Swift declaration
var deviation: Deviation

Semantically describes the manner in which the observed trend compares the current value against the baseline value.

get · iOS 16.0+

startIndex

TypeScript
get startIndex(): number
Swift declaration
var startIndex: Forecast<Element>.Index { get }

The forecast start index.

get · iOS 16.0+

endIndex

TypeScript
get endIndex(): number
Swift declaration
var endIndex: Forecast<Element>.Index { get }

The forecast end index.

get · iOS 16.0+

forecast

TypeScript
get forecast(): Array<number>
Swift declaration
var forecast: [Element]

The forecast collection.

set · iOS 16.0+

forecast

TypeScript
set forecast(value: Array<number>)
Swift declaration
var forecast: [Element]

The forecast collection.

get · iOS 16.0+

metadata

TypeScript
get metadata(): WeatherMetadata
Swift declaration
var metadata: WeatherMetadata

Descriptive information about the forecast data.

set · iOS 16.0+

metadata

TypeScript
set metadata(value: WeatherMetadata)
Swift declaration
var metadata: WeatherMetadata

Descriptive information about the forecast data.

get · iOS 16.0+

summary

TypeScript
get summary(): string
Swift declaration
var summary: String { get }

A convenient localized description of the minute forecast.

subscript · iOS 16.0+

subscript

TypeScript
subscript(position: number): number
Swift declaration
subscript(position: Forecast<Element>.Index) -> Element { get }

The forecast element at the provided index.

Skipped declarations

12 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

WeatherService.weather(for:including:)

Swift parameter packs cannot cross the bridge.

WeatherService.dailyStatistics(for:forDaysIn:including:)

Swift parameter packs cannot cross the bridge.

WeatherService.dailyStatistics(for:including:)

Swift parameter packs cannot cross the bridge.

WeatherService.dailyStatistics(for:startDay:endDay:including:)

Swift parameter packs cannot cross the bridge.

WeatherService.dailySummary(for:forDaysIn:including:)

Swift parameter packs cannot cross the bridge.

WeatherService.dailySummary(for:including:)

Swift parameter packs cannot cross the bridge.

WeatherService.hourlyStatistics(for:forHoursIn:including:)

Swift parameter packs cannot cross the bridge.

WeatherService.hourlyStatistics(for:including:)

Swift parameter packs cannot cross the bridge.

WeatherService.hourlyStatistics(for:startHour:endHour:including:)

Swift parameter packs cannot cross the bridge.

WeatherService.monthlyStatistics(for:including:)

Swift parameter packs cannot cross the bridge.

WeatherService.monthlyStatistics(for:forMonthsIn:including:)

Swift parameter packs cannot cross the bridge.

WeatherService.monthlyStatistics(for:startMonth:endMonth:including:)

Swift parameter packs cannot cross the bridge.