Until recently, I was unable to use WeatherKit to obtain historical Daily data. Now, it appears that I can retrieve Daily and Hourly historical data, but the returned data is limited to a ten day period. No matter what start and end dates are included, I get data from start date to 10 days later (assuming the end date was more than 10 days after the start).
Is this a permanent restriction?
Example: let historicalData = try await weatherService.weather(for: location, including: .daily(startDate: startDate, endDate: endDate))
WeatherKit
RSS for tagBring weather information to your apps and services through a wide range of data that can help people stay up to date, safe, and prepared.
Posts under WeatherKit tag
69 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I am working on an app that pulls data from weatherKit, including the conditionCode property, the content of which is displayed to the user. I wish to localize the data pulled from weatherKit but when pulling data from:
weatherkit.apple.com/api/v1/weather/de/{latitude}/{longitude}
The conditionCode and other strings is in english. Same is true if the language parameter is set to es, ja or something else.
Am I doing something wrong or is localization yet to be supported in weatherKit? I can't find any documentation on this.
The weather data from Weather Kit REST API doesn't contain SF Symbol name.
Is there a way to get the SF Symbol name by "conditionCode"?
Why does the documentation say this field returns the intensity of precipitation in UnitSpeed, this seems confusing. Shouldn't the amount of precipitation be an amount like inch/hr, mm/hr why would the value be in speed?
The old dark sky documentation for this field shows the units were returned in inches/hour
I have added the WeatherKit capability and enabled it in the developer account for the respective app id. I continually get this error. Any ideas on how to fix this?
Failed to generate jwt token for: com.apple.weatherkit.authservice with error: Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors
I have read the WeatherKit docs and watched the "Meet WeatherKit" WWDC video but it is not clear where the trademark and legal link need to be displayed. Can someone at Apple please clarify this.
The docs state:
"If your apps, web apps, or websites display any Apple weather data, you must clearly display the Apple Weather trademark, as well as the legal link to other data sources."
I have a calendar style app on the App Store and want to incorporate weather data as simple icons into the day, week, month views with in the app.
Is it ok to just display the trademark and legal link in the app's Settings view where a user would first turn on this weather feature?
Or does it have to be displayed on every single view where weather data is displayed? Even if that data is just displaying a simple Sun or Cloud or Rain symbol to the user.
Thanks.
I'm trying to get historical data using the following syntax:
try await service.weather(for: location, including: .daily(startDate: past1, endDate: past2))
Where past1 and past2 are two dates in the past (I checked their format and they are correct).
I always get the same result, namely the 10 days default forecast you usually get calling service.weather(for: location)
Am I missing something?
Hi,
I'm in the process of developing a weather app using WeatherKit. Everything seems to be working fine in the Simulator, but when I put it on the device (iPhone 13 Pro Max) the temperature displays wrong.
Example:
On Simulator: 34 F
On Device: 34.98 F
Anyone else have this problem?
Dan Uff
Has anyone figured out the correct incantation of request parameters to get historic hourly weather conditions from WeatherKit? I've tried every combo of hourlyStart, dailyStart, currentAsOf, etc with past dates and it seems like the oldest it will go back to is midnight for today. I would like to get the last 24 hours of conditions.