Has anyone used WeatherKit from a commandline tool? I've set up the capability on my bundle identifier at developer.apple.com, but in Xcode the capability doesn't appear in the "+ Capability" list. I could fall back to the REST API, but that adds a lot of complexity that the Swift framework does for you.
=> More informations about this toot | More toots from cocoaphony@mastodon.social
Though I'm not sure if I can fall back to the REST API or not. I want historical data (dailyStatistics in the Swift API), and I'm not seeing that available on the REST side. It looks like you might be able to take specific snapshots by passing currentAsOf, but I don't see anywhere they publish high/low temperatures for a given day.
(I'm computing degree-days for an energy-tracking tool I'm working on.)
=> More informations about this toot | More toots from cocoaphony@mastodon.social
@cocoaphony not sure if this is the issue you're facing but one of the problems I've had building clis is that they don't have a bundle and a lot of stuff is built assuming the executable is inside one. You can work around this to some extent by pushing down into (and linking) your own framework or using an app target (deleting the UI boilerplate and treating it like a cli that lives inside a bundle)
=> More informations about this toot | More toots from numist@xoxo.zone
@numist I believe that entitlements can be applied via codesign (passing the --entitlements parameter). Other entitlements are added that way from what I'm seeing. I did try just directly adding the WeatherKit entitlement this way, but it SIGKILLs as soon as I launch.
=> More informations about this toot | More toots from cocoaphony@mastodon.social
@cocoaphony @numist entitlements do work on freestanding executables because they are stored along with the code signature. The console will have info on why your program was killed
=> More informations about this toot | More toots from fay59@tech.lgbt
@cocoaphony The entitlement claim needs to be authorised by a profile, which need a bundle structure.
https://developer.apple.com/documentation/xcode/signing-a-daemon-with-a-restricted-entitlement
=> More informations about this toot | More toots from justkwin@toot.community
@justkwin @cocoaphony FWIW, I did this to use CloudKit from a CLI and wrote about it in the readme of this project in the “Creating a Wrapped CLI” section. https://github.com/stevengharris/NSXcode. The section discussing the wrapped CLI is at https://github.com/stevengharris/NSXcode#creating-a-wrapped-cli
=> More informations about this toot | More toots from stevengharris@mastodon.social This content has been proxied by September (ba2dc).Proxy Information
text/gemini