Weatherkit Integration: invalidAuthorization: 401

Hey all,

Running into an issue with a WeatherKit.

Whenever I make a WeatherKit API call, I get this error:

Details: { domain: WeatherDaemon.WDSClientErrors, localizedDescription: invalidAuthorization: 401, underlyingError: Unknown, code: 3 }

This only happens when calling via the Swift package:

swift WeatherService.shared.weather(for: location).currentWeather When I was calling the WeatherKit REST API directly from Dart, everything worked fine.

So far I’ve:

Enabled WeatherKit in the Apple Developer account

Added the WeatherKit capability to the app

Refreshed provisioning profiles

Installed the app fresh on device/simulator

Has anyone seen this specific invalidAuthorization: 401 from WeatherDaemon.WDSClientErrors when using WeatherService in Swift, and know what might be missing or misconfigured?

Weatherkit Integration: invalidAuthorization: 401
 
 
Q