we’re looking to get some clarification around how the hourly forecasts should be interpreted to ensure we’re using your data in the correct manner. If you could provide the answers to the following questions would be extremely helpful:
1. What do the data points (e.g temperature) in the hourly forecast represent for a future hour? Do they represent the expected average over that future hour or do they represent the forecast for the point in time at the top of the hour?
2. What do those same data points represent in the hourly forecast for an hour which has already begun? e.g. it’s 8:30 and we pull the hourly forecast and the 8:00 hour is still returned. Which of the following would be the correct interpretation for the values returned for the 8:00 hour:
The values represent the forecast for the point in time at the top of the 8:00 hour (if this is the case we would expect it to stop updating)
The values represent the current forecast i.e. what the weather is right now
The values represent the average over the remaining portion of the 8:00 hour
The values represent the average over the full 8:00 hour including both the portion which has already elapsed and the portion which is still to come
3. What does the data represent after the hour (i.e. looking at historical hours)? Is it:
The last forecast made within the hour? If so, is that point-in-time or average for the hour (as explained above)?
The actual weather for that hour (using some non-forecast measure of real weather)? If so, again is that point-in-time at top of hour / point-in-time at end of hour / average over the hour?
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
67 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
We had a question that came up when we comparing data from WeatherKit to other sources - WeatherKit visibility was well beyond the boundaries we had historically, even from Darksky. That raises two questions:
is visibility actually in meters like the docs say?
is this visibility at ground level, 500ft, or some other height?
We were seeing visibility numbers of up to 40 miles (after converting the number the API sent to miles), where all of our other sources are usually within 10 miles
where can we find documentation on the following fields included in payloads? They're not listed alongside the other fields in the documentation linked below:
https://developer.apple.com/documentation/weatherkitrestapi/hourweatherconditions
precipitationIntensity
snowfallAmount
Or if we can get the data type, unit used, and description here that would be great
regarding forecastHourly payloads, what is the timezone of forecastStart?
just want to confirm what we are seeing in the payloads
is there documentation where we can find details for historical parameters / limitations - so far i've found that the days limit on single API calls days limit is 7. Any other similar specs would be good to have
is using /api/v1/weather/{language}/{latitude}/{longitude} the correct way to retrieve historical weather data for a location? e.g. getting hourly weather data for Seattle from 2016-03-04 to 2016-03-11?
https://developer.apple.com/documentation/weatherkitrestapi/get-api-v1-weather-_language_-_latitude_-_longitude_
this is pointed out in the API docs as being the method to pull hourly weather data for a specific location. It doesn't indicate wether it is for current weather or historical
I'm pretty new on this platform and also developing IOS mobile apps. I've been struggling for using the data of the api weather kit apple. I have an acount of apple developer, downloaded the certificate... i follow all the necessaries steps in the portal and also in my project and i keep having this error message when i try to use it. I don't know what else should i do for having working it. I would absolutely appreciate that someone could help me with this. Thank you very much!!!!!
Encountered an error when fetching weather data subset; location=<+41.38268070,+2.17702390> +/- 0.00m (speed -1.00 mps / course -1.00) @ 2/3/25, 22:54:03 Central European Standard Time, error=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors 2 Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 "(null)"
I have an app that I configured correctly. Checked the WeatherKit for the App ID, and added the WeatherKit to the Entitlements, and verified the Bundle ID was correct. I am getting the following error:
Failed to generate jwt token for: com.apple.weatherkit.authservice with error: Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 "(null)"
Encountered an error when fetching weather data subset; location=<+38.97170000,-95.23530000> +/- 0.00m (speed -1.00 mps / course -1.00) @ 3/1/25, 8:34:24 AM Central Standard Time, error=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors 2 Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 "(null)"
I then made a super simple app that has a hard coded CLLocation and makes the single API call to get the weather and that fails with the same error. This error is still happening after 12 - 48 hours after creating the AppID. I have dumped the contents of the Provisioning Profile for both apps and the Entitlement section looks correct for both. I am not sure what is configured incorrectly, or what steps I should take next.
I have been struggling with getting accurate data from the weatherkit api. It tends to be just different enough from the weather app on the phone.
While debugging this I randomly added forecastNextHour to my dataset string and it suddenly made everything match the app and the data looked good.
For example there is at this moment a snow storm in Billings. This url:
https://weatherkit.apple.com/api/v1/weather/en-US/45.79/-108.50?dataSets=currentWeather,forecastHourly,forecastNextHour&timezone=America/Denver&country=US
says that there is heavy snow, and there is a 100% chance for the next few hours. This matches the iOS app.
This url without forecastNextHour:
https://weatherkit.apple.com/api/v1/weather/en-US/45.79/-108.50?dataSets=currentWeather,forecastHourly&timezone=America/Denver&country=US
Says it is hazy and there is a small chance of snow of snow for the next few hours. Like 20-30 percent. This does not match any weather data I can find.
I have even checked the forecastStart times and the current weather asOf time. They all match up and are accurate.
Is there some unknown reason that without forecastNextHour the API becomes inaccurate?
Thanks!
I just noticed something really odd with WeatherKit.
If the temperate at midnight of the FOLLOWING day is colder than all temps in the day you want weather for then WeatherKit will report that as the low temperature for the day even though it's a different day.
Here it's reporting the lowest temp for Feb 6 is 22F. But that's a temp from Feb 7. I'm displaying lowTemperature and lowTemperatureTime from DayWeather as well as the HourWeather in these examples.
I wasn't sure if this was working as designed or a bug. I can provide raw data from this example.
----daily formatted start
weather for Feb 6
High 41°
high at Feb 6 at 2 PM
Low 22°
low at Feb 7 at 12 AM
----daily formatted end
Feb 6 at 12 AM 34°
Feb 6 at 1 AM 35°
Feb 6 at 2 AM 36°
Feb 6 at 3 AM 36°
Feb 6 at 4 AM 36°
Feb 6 at 5 AM 34°
Feb 6 at 6 AM 33°
Feb 6 at 7 AM 33°
Feb 6 at 8 AM 33°
Feb 6 at 9 AM 33°
Feb 6 at 10 AM 35°
Feb 6 at 11 AM 36°
Feb 6 at 12 PM 38°
Feb 6 at 1 PM 40°
Feb 6 at 2 PM 41°
Feb 6 at 3 PM 40°
Feb 6 at 4 PM 39°
Feb 6 at 5 PM 37°
Feb 6 at 6 PM 36°
Feb 6 at 7 PM 33°
Feb 6 at 8 PM 31°
Feb 6 at 9 PM 29°
Feb 6 at 10 PM 27°
Feb 6 at 11 PM 24°
Feb 7 at 12 AM 22°
I've noticed that very consistently the Weatherkit API times out when I make a large(-ish) number of calls at 7am east coast time.
If I make x calls between 7:00:00 and 7:01:00 about half of them time out (as do retries.)
If I make 2x the calls between 7:15:00 and 7:16:00 there are close to zero time outs.
I've looked at the logs, at the calls per second, etc., and there is no difference between 7 and 7:15.
So, I'm not hitting a rate limit. It seems like Weatherkit itself just can't handle the traffic at peak times.
Is there any other explanation? Does Apple intend to make sure the API can handle all the traffic they are getting paid to handle?
I have been using the hourly weather forecast API, for some reason sometimes the API fails with 400 Bad Request, but on retrying just a minute later the call successfully returns data. The start and end time are 2 days apart so I don't think it's an issue with the time frame.
The failed calls also don't return any reason so not sure what is the exact failure.
Has anyone encountered this issue or knows why this might be happening??
Thanks!!
Background:
We are using Apple WeatherKit for an app to fetch future weather data specialty cloudCover and condition and pretipitationChance from the Overnightforecast data from weatherResponse.dailyForecast.forecast array object.
Code Sample:
On xcode on Swift and Swift UI using Apple WeatherKit
task{
do{
let weatherResponse= try await self.weatherService.forecast(for: latLong)
let cloudCover = weatherResponse.dailyForecast.forecast[0].overnightforecast.cloudCover
Issue:
While we are on debug mode, we can literally see overnightforecast.cloudCover data (as well as condition and pretipitationChance) is available under from index 0 to index 10 of weatherResponse.dailyForecast.forecast array object but when we are trying to assign this property, its throwing error as
"overnightforecast object not present under weatherResponse.dailyForecast.forecast array object"
Attachment:
Hello,
I have an app on the App Store built around WeatherKit and it was working fine, up until this morning when I started seeing errors when using the app.
When debugging using Xcode I see the familiar error
Failed to generate jwt token for: com.apple.weatherkit.authservice with error: Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 "(null)"
which, according to what I've read on the forums looks like an authentication error.
Attaching a network debugger to the Simulator, I saw this error:
This I have tried:
Verify that WeatherKit is enabled on both Capabilities and App Services tabs on the Dev Portal.
Toggle on/off this value and regenerate Provisioning Profiles
Uninstall/reinstall
Checking that I have API available calls.
Nothing. If I create a new Bundle ID and sign with that, it works correctly. But this is not an option since that will force all my customers to download everything from scratch.
I am getting emails from customers demanding money back and I can't figure out what has happened.
The only thing I can think of, is that I started developing an Apple Watch app to complement the iOS app, but that was last week and everything was working fine.
After changing the bundle identifier of my app, I’ve encountered several issues that I can’t seem to resolve, even though I’ve followed all the necessary steps. The app with the previous identifier was live on Testflight, and working perfectly fine, but now I’m facing the following problems:
WeatherKit Authentication Issue
WeatherKit has stopped working, and I’m getting authentication errors. I’ve updated the app in the Developer Portal to reflect the new bundle ID, but it still doesn’t authenticate properly.
Xcode Cloud Configuration Issue:
Xcode is asking me to set up Xcode Cloud again, which I understand is expected after a bundle ID change. However, during the setup process, it fails to recognize my remote repository, even though the repository is correctly added and visible under the Source Control tab.
TestFlight Internal Testing Issue:
I manually uploaded a build to TestFlight, but internal testers cannot use it because the invitation appears as invalid. This wasn’t an issue with the app’s previous identifier.
It seems like the bundle ID change has caused some fundamental issues that I can’t resolve despite following all the usual instructions. Has anyone experienced this before or knows how to resolve these problems?
I'm using the latest Xcode 16.2 on Mac OS Sequoia 15.2
Topic:
Developer Tools & Services
SubTopic:
Xcode Cloud
Tags:
Bundle ID
TestFlight
Xcode Cloud
WeatherKit
Hi there,
I am using WeatherKit to display weather forecast information in an app.
I would like to include some information about when the weather forecast was issued for my users to see.
This information is included in the response Metadata as documented in the WeatherKit REST API docs:
https://developer.apple.com/documentation/weatherkitrestapi/metadata
Specifically there is a “reportedTime” property which I would like to use here.
However I am consuming WeatherKit via the Swift API, I don’t see this property available via the Swift APIs.
How can I access the reportedTime property via the WeatherKit Swift APIs? Or is it not exposed via the Swift APIs?
I filed FB16332997 about the VERY high snowfall estimates I'm seeing in WeatherKit and iOS Weather. I initially thought something was wrong with my weather app but I verified the numbers with the iOS Weather app and another third party weather app.
For Atlanta last week it was saying 7.5" when it ended up being 2" (which I can live with).
Two days ago it reported there could be 16" of snow in northern Florida. That's impossible!
This morning it was reporting that Niceville could have 6-7" of snow, which would be significantly more than highest amount in recorded history for Florida (where snow is extremely rare).
It almost makes me wonder if the liquid precipitation value is actually the snowfall amount in reality. And then that is incorrectly being converted to the snowfall amount.
Hey,
I'm trying to update my old app that used DarkSky to WeatherKit, and struggling. I always get:
ailed to generate jwt token for: com.apple.weatherkit.authservice with error: Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 "(null)"
This is regardless if I do it on my iPad, or in the simulator. I have done the following:
Selected WeatherKit on the Capabilities and App Services tabs of the Identifier section on developer.
Put it under signing and capabilities in XCode
I've tried making a new provisioning profile, cleaning build folder, etc. Not sure what to do here. I suspect part of this problem is that I developed this app in 2018 and now I'm trying to update it.
I am able to run the app on TestFlight, but not as an internal tester. Apple won't let me, so I have to add myself as an external tester.
Thanks for any help you can provide!
Hi There,
My app displays both daily and hourly forecast information, as consumed from the Weatherkit API.
I would also like to let my users know when the forecast was generated/issued. The reason being, if a forecast was issued 1-2 hours in the past for example, then the user(s) will know to refresh the weather forecast for the latest information soon.
Looking through the docs, I don't see any way of accessing this information. I would expect it to be available on the hourlyForecast.metadata property.
Does anyone know if it's possible to obtain the 'issued time' of the forecast? (both hourly and daily).
Thanks
Hi,
I'm trying to implement WeatherKit for the first time and I am seeing this error when calling for the weather:
Failed to generate jwt token for: com.apple.weatherkit.authservice with error: Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 "(null)"
and
Encountered an error when fetching weather data subset; location=<+51.57750785,-2.08241362> +/- 6.55m (speed -1.00 mps / course -1.00) @ 11/01/2025, 11:50:45 Greenwich Mean Time, error=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors 2 Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 "(null)"
I have:
Enabled the WeatherKit capability in my iOS app in XCode
Added Weatherkit to the AppID in the developer portal
Any suggestions what else I can check?
I'm running iOS 18.2.1 on 15 ProMax with XCode 16.2