All of my apps stopped working with WeatherKit this morning. They all return an "Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2" error.
I am certain that the WeatherKit capability added (in project) and enabled as a Capability & App Service (on developer portal for the identifier). All other iCloud features of my apps are working as expected. I have also done all the normal troubleshooting using codesign / security cms, etc. to verify entitlements.
I created the following simple project to verify the integration.
import WeatherKit
import CoreLocation
struct ContentView: View {
@State private var temp: Measurement<UnitTemperature>? = nil
var body: some View {
VStack {
if let t = temp {
Text("\(t.value.rounded())°\(t.unit.symbol)")
} else {
Text("Fetching…")
.task {
let service = WeatherService()
do {
let location = CLLocation(latitude: 50.318668, longitude: -114.917710)
let weather = try await service.weather(for: location, including: .current)
temp = weather.temperature
} catch {
print("Error:", error)
}
}
}
}
}
}
Any ideas what may be happening?