Skip to content

Simple API for those who work with WeatherKit from Apple

Notifications You must be signed in to change notification settings

charming-whaley/WeatherKitAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

WeatherKitAPI

A simple API that makes it easier to work with WeatherKit from Apple.

Description

If you always stuck while working with WeatherKit or you want to just do your project rather than focusing on how it works then WeatherKitAPI is a great solution for that

Getting started

1. Make sure your project version is: iOS17+, macOS15+, watchOS10+, visionOS1+
2. Download WeatherKitAPI files from the repository using Swift Package Manager
3. Enable WeatherKit in your project (for Apple Developer Program users only)
4. Use necessary function from WeatherKitAPI

Usage

Package is followed by WeatherKitAPI class that contains all methods for getting current forecast from Apple.
You may also add WeatherKitAttributionView to your porject in order to show that you are working with WeatherKit.
It is very important to enable WeatherKit in your project, otherwise nothing will happen and your code will throw an error!

You just need to make a reference to WeatherKitAPI shared in your code:

struct ContentView : View {
    
    let controller = WeatherKitAPI.shared

    var body : some View {
        Text("I use WeatherKit!")
    }
    
}

About

Simple API for those who work with WeatherKit from Apple

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages