×

Get Weather Report

iOS 14 +

Notes

Get the weather for a specified location.

Syntax

currentForecast(location: <#Unknown Parameter#>, forecastType: <#Enumeration (ForecastType)#>, dataType: <#Enumeration (DataType)#>, timeThreshold: <#Enumeration (TimeThreshold)#>)

Example

currentForecast(location: Placemark(addressDictionary: AddressDictionary(City: "", Country: "", CountryCode: "", FormattedAddressLines: ["", ""], Name: "", State: "", Street: ""), SubAdministrativeArea: "", SubThoroughfare: "", Thoroughfare: "", ZIP: ""), location: Location(altitude: 0, course: 1, horizontalAccuracy: 0.0, latitude: 0, longitude: 0, speed: 1, timestamp: 2022-02-22t22:22:22Z, verticalAccuracy: 1), region: Region(center: Center(latitude: 0.0, longitude: 0.0), identifier: "", radius: 100.0)), forecastType: current, dataType: , timeThreshold: )