I have an app using weatherkit and its currently live and up on the app store, recently I had some users report to me that they had been receiving errors loading weather data, I had error handling built in and it reported an issue with apples authentication server
Failed to generate jwt token for: com.apple.weatherkit.authservice with error: Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 "(null)"
I have not come across this during the development lifecycle of my project, there where no codebase changes, it just stopped functioning.
The app entitlements are valid and correct, Weatherkit is enabled in both xcode and across my Certs, identifiers and profiles.
I was not experiencing this issue until I reinstalled the app from the app store completly by first removing it and then re-installing fresh.
Hard reboots do not help and I do not want to start suggesting to my users to factory reset their devices.
-
We are using WeatherKit in both our main app and widget, relying entirely on Apple’s framework for authentication and token management.
-
We do not generate or inject our own JWT tokens; all token handling is managed by WeatherKit.
-
We have implemented a debug menu with the following actions:
-
Clear WeatherKit JWT tokens from the keychain
-
Clear all related UserDefaults key
-
Clear all app group data and all UserDefaults.
-
Perform a “nuclear” cache clear (removes all app data, keychain, and cached files).
We log all WeatherKit fetch attempts and failures, including authentication errors, both in the app and widget and get nothing but code 2.
We have attempted all of the above steps, but continue to experience issues with WeatherKit JWT authentication
We would appreciate any guidance or insight into what else could be causing persistent WeatherKit JWT/authentication issues, or if there are any additional steps we should try.
P.S. - Tested and experiencing the same issues on an iPhone 15 Pro Max and iPhone 15
The Pro Max is on the iOS 26 Beta // and the 15 is on the latest iOS 18