
Weatherkit
Comprehensive reference for Apple's WeatherKit that covers the entire API surface: current conditions, hourly and daily forecasts, weather alerts, and minute-by-minute precipitation where available. The selective query examples are especially useful since they show how to fetch only what you need instead of pulling everything. The attribution section is critical because Apple requires you to display their weather mark and legal links, and the skill includes ready-to-use SwiftUI code for both light and dark modes. Also covers availability checking, which matters because datasets like minute forecasts only work in certain regions. Good for anyone building weather features in iOS apps who needs to understand the entitlement setup and API patterns.
- skills.sh installs
- 3.6K
- GitHub stars
- 1.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add dpearson2699/swift-ios-skills --skill weatherkit --agent claude-codeInstalls into .claude/skills of the current project.
Files
WeatherKit
Fetch current conditions, hourly and daily forecasts, weather alerts, and
historical statistics using WeatherService. Display required Apple Weather attribution.
Contents
- Setup
- Fetching Current Weather
- Forecasts
- Weather Alerts
- Selective Queries
- Context Queries
- Attribution
- Availability
- Common Mistakes
- Review Checklist
- References
Setup
Project Configuration
- Enable the WeatherKit capability in Xcode (adds the entitlement)
- Enable WeatherKit for your App ID in the Apple Developer portal
- Add
NSLocationWhenInUseUsageDescriptionto Info.plist if using device location - WeatherKit requires an active Apple Developer Program membership
Import
import WeatherKit
import CoreLocation
Creating the Service
Use the shared singleton or create an instance. WeatherService conforms to
Sendable; keep app cache and UI state isolated separately.
Sponsors
Details
- Repository
- github.com/dpearson2699/swift-ios-skills
- Categories
- Data Science & ML, Mobile Development
- First seen
- Apr 16, 2026
More from dpearson2699/swift-ios-skills
All 98- Activitykit3.5K
- Cloudkit3.5K
- Photokit3.4K
- Mapkit3.4K
- Swiftui Webkit3.4K
- Realitykit3.4K
- Avkit3.4K
- Spritekit3.3K
- Cryptokit3.3K
- Metrickit3.3K
- Pdfkit3.3K
- Gamekit3.3K
- Eventkit3.3K
- Musickit3.3K
- Swift Architecture3.3K
- Pencilkit3.3K
- Carplay3.2K
- Ios Simulator3.2K
- Scenekit3.2K
- Homekit3.2K
- Accessorysetupkit3.2K
- Callkit3.2K
- Cryptotokenkit3.2K
- Financekit3.2K