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

주제별