Live data from Hacker News

WeatherKit

developer.apple.com

21–30 of 203 posts

Re: WeatherKit

#22
post #17

Earlier quoted context omitted.

There is a rest api. > It’s easy to use WeatherKit in your apps for iOS 16, iPadOS 16, macOS 13, tvOS 16, and watchOS 9 with a platform-specific Swift API, and on any other platform with a REST API. [edited for tone]

I was questioning why WeatherKit needs a "platform-specific Swift API" at all. If the general REST API in Swift is good then WeatherKit can be integrated into Swift apps as easily as any other service. If it's not easy then improvements to the general REST API could be considered.

There are all kinds of potential performance benefits to a native SDK. Cross app caching for such common data could be a huge boon for watchOS complications & Home/Lock Screen widgets, for instance.

No idea if they are implementing those kinds of enhancements but it’s no surprise that a native SDK would be provided.

Also, how would they implement the privacy preserving black box location implementation with a REST API? There is no need for the app to ask for or receive specific location details by using this SDK.

Re: WeatherKit

#23
post #17

Earlier quoted context omitted.

There is a rest api. > It’s easy to use WeatherKit in your apps for iOS 16, iPadOS 16, macOS 13, tvOS 16, and watchOS 9 with a platform-specific Swift API, and on any other platform with a REST API. [edited for tone]

I was questioning why WeatherKit needs a "platform-specific Swift API" at all. If the general REST API in Swift is good then WeatherKit can be integrated into Swift apps as easily as any other service. If it's not easy then improvements to the general REST API could be considered.

I imagine WeatherKit can then have leverage to do system-level caching of same data being requested by multiple apps?

Also not having to deal with web requests (client, retry logic, polling, etc)

Re: WeatherKit

#24

I learned in a meeting at my last job that many weather apps solely exist to collect and sell location data. Don’t have specific evidence but it seemed to be par for the course. So I’m glad to see this API, hopefully it’ll help more privacy focused weather apps thrive.

There is a whole ecosystem of apps that exist only to justify permissions. Weather and emergency alert/extreme weather notification apps are the most common ones to harvest location data from users in the background.

Re: WeatherKit

#25
post #17

Earlier quoted context omitted.

There is a rest api. > It’s easy to use WeatherKit in your apps for iOS 16, iPadOS 16, macOS 13, tvOS 16, and watchOS 9 with a platform-specific Swift API, and on any other platform with a REST API. [edited for tone]

I was questioning why WeatherKit needs a "platform-specific Swift API" at all. If the general REST API in Swift is good then WeatherKit can be integrated into Swift apps as easily as any other service. If it's not easy then improvements to the general REST API could be considered.

> I was questioning why WeatherKit needs a "platform-specific Swift API" at all

So you can use it without having to deal with the low level detail of HTTP connections.

Re: WeatherKit

#26
post #17

Earlier quoted context omitted.

There is a rest api. > It’s easy to use WeatherKit in your apps for iOS 16, iPadOS 16, macOS 13, tvOS 16, and watchOS 9 with a platform-specific Swift API, and on any other platform with a REST API. [edited for tone]

I was questioning why WeatherKit needs a "platform-specific Swift API" at all. If the general REST API in Swift is good then WeatherKit can be integrated into Swift apps as easily as any other service. If it's not easy then improvements to the general REST API could be considered.

My hunch, but I'm not sure about this, is that there might be some centralized caching going on on with the native SDK, so that if multiple apps use the WeatherKit API, they can share the cache.

Re: WeatherKit

#27
post #20

The Norwegian Meteorological Institute has an excellent free HTTP/JSON weather API that covers the globe. No signup required. https://developer.yr.no

Their weather app is also pretty good. It comes with an English language option.

Re: WeatherKit

#28
post #27
post #20

The Norwegian Meteorological Institute has an excellent free HTTP/JSON weather API that covers the globe. No signup required. https://developer.yr.no

Their weather app is also pretty good. It comes with an English language option.

iOS: https://apps.apple.com/jo/app/yr-no/id490989206 Android: https://play.google.com/store/apps/details?id=no.nrk.yr&hl=n...

Re: WeatherKit

#30
post #20

The Norwegian Meteorological Institute has an excellent free HTTP/JSON weather API that covers the globe. No signup required. https://developer.yr.no

I've set up an iPad in my hallway to show their SVG weather charts. Super simple to integrate into a simple home made dashboard website.

Here is Oslo: https://www.yr.no/en/content/1-72837/meteogram.svg

Post reply on HN