Post

Replies

Boosts

Views

Created

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.
0
0
35
17h
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.
Replies
0
Boosts
0
Views
35
Activity
17h