My app has been using WeatherKit via its REST API for months with success. Suddenly, the weatherkit API only returns to me "reason" : "NOT_ENABLED" now.
I am unsure why it is suddenly telling me WeatherKit is not enabled?
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
68 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
I've received a forecast with non-zero precipitationChance and zero precipitationIntensity. Is this expected? How should I interpret the data?
{
"forecastStart": "2023-09-02T02:00:00Z",
"cloudCover": 0.55,
"conditionCode": "PartlyCloudy",
"daylight": false,
"humidity": 0.92,
"precipitationAmount": 0,
"precipitationIntensity": 0,
"precipitationChance": 0.31,
"precipitationType": "clear",
"pressure": 1017.56,
"pressureTrend": "steady",
"snowfallIntensity": 0,
"snowfallAmount": 0,
"temperature": 12.56,
"temperatureApparent": 12.22,
"temperatureDewPoint": 11.26,
"uvIndex": 0,
"visibility": 23505.2,
"windDirection": 233,
"windGust": 6.17,
"windSpeed": 2.82
}
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
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.
Hello - migrated from darksky to WeatherKit in April of this year. With some difficulty finally got the REST API to work via the following resources:
https://developer.apple.com/weatherkit/get-started/
which is horribly inadequate for JWT instructions. So i also used:
https://dev.iachieved.it/iachievedit/weatherkit-rest-api/
which was quite helpful.
As stated, in April i managed to get this working. About a week ago it stopped working.
The response from my calls are 401 Unauthorized in the header and { "reason": "NOT_ENABLED" } in the body.
I believe the key i created expired and thus WeatherKit stopped responding. So i tried to re-enable access using the same Apple key and a new JWT signature. That did not seem to work, so i removed the old key and created a new one. Downloaded the p8 file and used openssl on my ubuntu server to create pem and pub files for the jwt token. Still nothing. I have tried almost all combinations of keys and ID #s in the JWT.io console that i can think of.
Importantly, nowhere in the official Apple documentation does it say what parameters the key creation and expiry dates can be. Does the key creation date have to match the date the key was created in Apple Developer Console??? What expiry dates are valid???? No idea.
I have submitted a code level request, but they punted me to feedback which apparently does nothing. Still no resolution, nor have i been contacted once by an Apple representative. This is what my $200 developer fee gets me?! Unacceptable.
If anyone has any idea on how to resolve this issue and/or create valid jwt tokens easier (via PHP preferably), i'm all ears.
Thanks, airyt
Could somebody please point me to the project download mentioned in Novall Khan’s “Meet Weatherkit” presentation?
I’d additionally or alternatively be interested in any working examples for using the rest API, eg in Python, to access Weatherki.
thanks,
Rob
What is the highest level of location precision achievable with the WeatherKit API? When latitude and longitude are given up to the fifth decimal place, the precision is around 1 meter. Could this ever be more accurate than providing the lat/long to the fourth decimal place, which has a precision of about 10 meters?
I am able to obtain daily forecasts via the REST API which include the daytimeForecast and overnightForecast records with their respective properties like cloudCover.
So far I have failed to access them via the Swift API:
forecast.daytimeForecast.cloudCover
results in: "Value of type 'DayWeather' has no member 'daytimeForecast'".
But if I print() the DayWeather objects, these members are actually printed with all their properties.
Is there a way to get them I am overlooking?