Apple WeatherKit Error Xcode 14 Beta 5 iOS 16

Viewed 328

Trying to get to get the WeatherKit Beta working. have had the same error on Xcode 14 Betas 3/4/5 on both simulator and physical device using the apple provide example from WWDC or a simple project to load weather data.

The error output is always:

2022-08-12 15:56:02.825925-0400 WeatherPup[47533:15014528] [AuthService] Failed to generate jwt token for: com.apple.weatherkit.authservice with error: Error Domain=AMSErrorDomain Code=12 "Mescal Failed" UserInfo={NSLocalizedDescription=Mescal Failed, NSLocalizedFailureReason=SAPInit failed: -42049}

Has anyone been successful in building using this Beta yet? I would imagine it should work since dark sky weather service is still running.

I have all certificates, identifiers, privileges setup as they should be and triple checked bundle identifiers, etc.

2 Answers

I've had the same issue and here are the 2 things I had to do to make it work:

  1. Make sure that you have the WeatherKit checkbox checked under the development portal in both places - Capabilities and App Services:

enter image description here

  1. As of Beta 5 I've only been able to successfully fetch weather information from the API when building on a real device.

I have the same issue. It doesn't work on simulator XCode 14 beta 6 and earlier.

It's working only on physical device with iOS16 Beta

Except of using physical device be sure You:

1.Configured correctly identifier. You have to select "WeatherKit" under "Capabilities" and "App Services" and waited at least 30min

2.Be sure You have added WeatherKit capabilities in XCode under Singing & Capabilities tabs in project settings

For more info visit:

https://help.apple.com/developer-account/?lang=en#/devfe6684fd6 https://developer.apple.com/weatherkit/get-started/

Related