WeatherKit WeatherService fails to generate JWT with WDSJWTAuthenticator Code=2 despite valid entitlement/profile

Hi Apple Developer Support / WeatherKit team,

I’m trying to use native iOS WeatherKit through WeatherService.shared in a SwiftUI app. Every request fails before weather data is returned because WeatherDaemon cannot generate the WeatherKit JWT.

I am not using the REST API or manually generating a JWT. This is the native Swift WeatherKit API.

import WeatherKit import CoreLocation

let current = try await WeatherService.shared.weather( for: CLLocation(latitude: 25.76, longitude: -80.19), including: .current ) I also tested the same pattern used in Apple’s sample project, “Fetching weather forecasts with WeatherKit,” which calls:

WeatherService.shared.weather(for: location, including: .current) The error I get is:

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; error=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors 2 Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 "(null)" Setup details:

Paid Apple Developer Program account Native iOS SwiftUI app Physical iPhone, not Simulator WeatherKit capability enabled in Developer portal App ID has WeatherKit enabled Xcode Signing & Capabilities includes WeatherKit Automatic signing enabled Provisioning profile regenerated through Xcode App deleted and reinstalled after configuration changes Clean Build Folder / DerivedData cleanup attempted Bundle ID in Xcode matches the App ID in Developer portal Tested .current, .hourly, and .daily WeatherKit subset requests Ensured I am not running on “My Mac Designed for iPhone/iPad” I verified the built app’s entitlements. They include:

application-identifier = [REDACTED_TEAM_ID].[REDACTED_BUNDLE_ID] com.apple.developer.team-identifier = [REDACTED_TEAM_ID] com.apple.developer.weatherkit = true get-task-allow = true The embedded provisioning profile also includes:

com.apple.developer.weatherkit = true Because the entitlement and provisioning profile appear correct, and the failure happens during JWT generation before weather data is returned, this seems like either a WeatherKit entitlement propagation issue or a backend authorization issue.

Can Apple staff clarify what WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 means, and whether there is a way to verify that WeatherKit JWT generation is enabled for my App ID?

I can provide my Team ID, Bundle ID, provisioning profile details, and full device logs privately if needed.

same error what gives?

As a starting point, please take a look at the instructions in the documentation. It goes step-by-step, and you should review the steps to make sure you did each one of them.

Important: Step 5 — enabling WeatherKit under the App Services tab on the Developer website — is often overlooked.

Enabling WeatherKit under the App Services tab on the Developer website.

^^This was my issue and I spent hours trying to fix it!

It's not in any of the models, they keep having you try Identifiers and Cert Refreshes. TY!

WeatherKit WeatherService fails to generate JWT with WDSJWTAuthenticator Code=2 despite valid entitlement/profile
 
 
Q