@axint/weather-widget
A home-screen weather widget. Small, medium, and large families from one TypeScript definition.
axint add @axint/weather-widget
What you get
Compiling this template through Axint emits:
WeatherWidget.swiftwith aTimelineEntry, aTimelineProvider, a SwiftUI body, and a@mainWidget conformanceInfo.plist.fragmentwith the location usage description- Proper
supportedFamilies()declarations for small, medium, and large
Where the data comes from
The widget expects a timeline provider that hands it a WeatherEntry each update. The template declares the entry shape; wire it up to WeatherKit, OpenWeatherMap, or any source in your app's timeline provider.
Customizing
Edit source/widget.ts to:
- Change the body layout with the
view.*helpers - Add new families (e.g.
accessoryCircularfor Apple Watch) - Adjust
refreshInterval— default is 30 minutes
Recompile with:
axint compile source/widget.ts --out generated/
License
Apache-2.0