Getting Started with WeatherKit
Apple introduced WeatherKit during WWDC 2022, which offers weather data for your apps and services powered by the all-new Apple Weather Service. It uses high-resolution weather models, machine learning, and prediction algorithms to provide hyperlocal weather forecasts around the world without compromising user privacy.
In this chapter, you’ll modify the Let’s Eat app to use WeatherKit to get weather information for a particular restaurant and display it on the Restaurant Detail screen. You’ll begin by learning how WeatherKit works. Next, you’ll create the App ID and add the WeatherKit capability to the Let’s Eat app. After that, you’ll create a new data manager class, WeatherDataManager
, to get the weather from a specific restaurant’s location. Finally, you will update the RestaurantDetailViewController
class to display weather at a restaurant’s location on the Restaurant Detail screen.