Register Apple Watch App for Weather Kit

Hi all, I have created app that uses WeatherKit for iOS. All works great. But i also did an AppleWatch app [linked to the iOS app] that has a bundle id of (ex: .myweatherwatchapp). When i try to load data on it I get "[AuthService] Failed to generate jwt token for: com.apple.weatherkit.authservice with error: Error Domain=WeatherDaemon.WDSJWTAuthenticatorService.Errors Code=1 "(null)""

I have added weatherKit as capability under the Watch target.

Is there anything specific that i need to configure in order to use WeatherKit on Apple Watch app?

I have exactly the same problem. I have an iOS app that uses WeatherKit just fine. Added a Watch app for existing iOS app, added WeatherKit capability for the watch app, get this error. Okay, not exactly - mine says that the error is Error Domain=WeatherDaemon.WDSJWTAuthenticatorServiceListener.Errors Code=2 "(null)"

Just an addendum - I thought perhaps I hadn't waited long enough, but I still get the same type of error the next day. I had added weather kit capability via +Capability in Xcode. I checked Certificates, Identifiers & Profiles in developer.apple.com, and it shows a checkmark next to WeatherKit for both the original iOS app as well as the new watch target.

I also created a completely new project containing a new watch app with associated iOS app and again added the WeatherKit capability for both targets in Xcode, and get the same type of errors. I am now also getting some errors that say "Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)")", but the app "runs" and I can get location, etc... just not weather.

Just in case the problem is that adding the WeatherKit capability in Xcode isn't "good enough", I deleted the capability in the new project in Xcode, deleted the AppID in Certificates, Identifiers & Profiles, then recreated the AppID in Certificates, Identifiers & Profiles with the bundle ID already shown in Xcode, and with WeatherKit checked during AppID creation. This resulted in the exact same errors.

Okay - I solved my problem, which is that I THOUGHT I was following instructions correctly, but I wasn't. Confirmation bias hits again!

It's embarrassing, but I will provide this information to hopefully help anyone else making the same mistake and spare them the embarrassment of posting the same problem.

WeatherKit has to be "enabled" for each app target in TWO PLACES.

  • WeatherKit needs to be added as a CAPABILITY for the app target. It appears that this can be done either in the Certificates, Identifiers & Profiles developer web page or within Xcode. But you have to go to the web page anyway because...
  • The WeatherKit SERVICE needs to be enabled for the app target. It appears this can ONLY be done in the Certificates, Identifiers & Profiles developer web page. Click on the app target in question. There are TWO tabs - "Capabilities" and "App Services". Click App Services and check WeatherKit.

My problem was that once I had WeatherKit checked in Capabilities, I thought I was done, so I didn't even notice that "App Services" was a tab or think that I would need to look in there (despite the instructions on setting up WeatherKit in the documentation). Glazed right over that part.

Hopefully as I learn more about iOS development I'll learn why someone might actually want the capability without the service, since WeatherKit is the only thing that appears on both tabs......... ;-P

10

thanks that solved my problem!

Register Apple Watch App for Weather Kit
 
 
Q