WidgetKit - sonkoni/Koni-Wiki GitHub Wiki
- Show relevant, glanceable content from your app on the iOS Home screen or macOS Notification Center.
Overview
-
WidgetKit gives users ready access to content in your app by putting widgets on the iOS Home screen or macOS Notification Center. Your widgets stay up to date so users always have the latest information at a glance. When they need more details, your widget takes them directly to the appropriate place in your app.
-
With three different sizes available (small, medium, and large), widgets can display a wide range of information. Users can personalize widgets to see details specific to their needs, and arrange their widgets in whatever way works best for them. When users stack widgets and enable Smart Rotate, WidgetKit automatically rotates the most relevant widget to the top, making sure users see the most important details at exactly the right time.
-
To implement a widget, you add a widget extension to your app. You configure the widget with a timeline provider, and use SwiftUI views to display the widget’s content. The timeline provider tells WidgetKit when to update your widget’s content.
- To make a widget user-configurable, you add a custom SiriKit intent definition to your extension. WidgetKit automatically provides a customization interface to let users personalize their widgets.
Topics
-
Widget Creation
- 📄 Creating a Widget Extension
- {} Building Widgets Using WidgetKit and SwiftUI
- {} Fruta: Building a Feature-Rich App with SwiftUI
- protocol Widget ~
- protocol WidgetBundle
- struct StaticConfiguration
- enum WidgetFamily
-
Configurable Widgets
- 📄 Making a Configurable Widget
- struct IntentConfiguration
- struct WidgetInfo
-
Timeline Management
-
- protocol TimelineProvider
- protocol IntentTimelineProvider
- struct TimelineProviderContext
- protocol TimelineEntry
- struct Timeline
- class WidgetCenter
-
User Interface
-
Location Services in Widgets
-
Smart Stacks
- 📃Increasing the Visibility of Widgets in Smart Stacks
- struct TimelineEntryRelevance
-
Widget Preview and Debugging
- 📃Debugging Widgets
- struct WidgetPreviewContext