Skip to content

Support WeatherKit capability #52

Open

Description

@DanielAdari

Description

This tool is amazing!
It was so easy to set up and everything just worked right out of the box.

I am new to iOS development, so I might be missing something else entirely.
I wanted to create a demo weather app using Apple's WeatherKit, went to
Apple developer portal and enabled the WeatherKit integration from there.

https://developer.apple.com/account/resources/identifiers/list

Then when running xtool dev I am getting:

Error: Client encountered an error invoking the operation "bundleIds_bundleIdCapabilities_getToManyRelated", caused by "Unknown", underlying error: The operation could not be completed. The data isn’t in the correct format..

Is this not supported yet or a bug?

Environment

  • Host OS (macOS/Linux/WSL): Ubuntu
  • Host OS version: 24.04
  • Target iOS version: 18.4.1

Activity

  1. kabiroberai commented on May 21, 2025

    @kabiroberai
    Member

    This is similar to #62 and #64, Apple's OpenAPI schema probably just doesn't include the WeatherKit capability in the capabilities enum. I think it should be easy to repro and fix the provisioning issue.

    Adding the WeatherKit capability from the developer portal may not be sufficient in this case though, because xtool "controls" the App ID it creates, which means it'll remove the WeatherKit capability since it's not declared in the project code. Fixing this will require implementing #46, which is relatively high-priority.

  2. kabiroberai commented on May 23, 2025

    @kabiroberai
    Member

    👋 once you update to v1.11.5 you shouldn't encounter the "Client encountered an error" issue anymore. Could you please confirm? I think you still won't be able to use the entitlement because that depends on #46, but if the other error is resolved I'll close this issue in favor of #46.

  3. kabiroberai commented on May 23, 2025

    @kabiroberai
    Member

    Actually now that we have support for entitlements (via #82) I realize we'll need to declare a capability <-> entitlement mapping for WeatherKit in order to correctly support it. Gonna leave this issue open to track this.

  4. changed the title [-]Allow xtool to parse capabilities[/-] [+]Support WeatherKit capability[/+] on May 23, 2025
  5. added
    enhancementNew feature or request
    and removed
    bugSomething isn't working
    on May 23, 2025
  6. DanielAdari commented on May 24, 2025

    @DanielAdari
    Author

    👋 once you update to v1.11.5 you shouldn't encounter the "Client encountered an error" issue anymore. Could you please confirm? I think you still won't be able to use the entitlement because that depends on #46, but if the other error is resolved I'll close this issue in favor of #46.

    I can confirm this is fixed!
    I did not actually use WeatherKit yet, so I don't know if it practically works, but the error is gone.

  7. khaledez commented on Sep 12, 2025

    @khaledez

    Any update on this @kabiroberai ?
    If you don't have bandwidth to work on it .. can you provide a quick guidance on how to implement it. Someone might be able to contribute! (hopefully me)

  8. kabiroberai commented on Sep 14, 2025

    @kabiroberai
    Member

    @khaledez I appreciate that! Yeah a tad busy with other work right now, but I'd be happy to review a PR. I'd recommend taking a look at the other capabilities to see how they're implemented, e.g. see SiriKit.

    The main difference with WeatherKit will be that, since it isn't declared in Apple's OpenAPI schema, you'll need to use a raw string for the key instead of the Components.Schemas.CapabilityType.Value1Payload enum. I just put up a PR to support that, feel free to branch yours off of this and then use DeveloperServicesCapability(rawName: ...):

    Also want to add: you'll probably need to inspect the network requests to determine the capability ID etc for WeatherKit. You can do this by setting export XTL_DEV_LOG=".*" which should print out network requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions