StaticConfiguration
struct · iOS 14.0+ · SDK 27.1
@MainActor @preconcurrency struct StaticConfiguration<Content> where Content : ViewAn object describing the content of a widget that has no user-configurable options. The following example shows the configuration for the leaderboard widget of the <doc://com.apple.documentation/documentation/widgetkit/emoji-rangers-supporting-live-activities-interactivity-and-animations> sample code project. struct LeaderboardWidget: Widget { public var body: some WidgetConfiguration { StaticConfiguration(kind: EmojiRanger.LeaderboardWidgetKind, provider: LeaderboardProvider()) { entry in LeaderboardWidgetEntryView(entry: entry) } .configurationDisplayName("Ranger Leaderboard") .description("See all the rangers.") .supportedFamilies(LeaderboardWidget.supportedFamilies) } } Every widget has a unique `kind`, a string that you choose. You use this string to identify your widget when reloading its timeline with <doc:WidgetCenter>. The timeline provider is an object that determines the timeline for refreshing your widget. Providing future dates for updating your widget allows the system to optimize the refresh process. The content closure contains the SwiftUI views that WidgetKit needs to render the widget. When WidgetKit invokes the content closure, it passes a timeline entry created by the widget provider's <doc:TimelineProvider/getSnapshot(in:completion:)> or <doc:TimelineProvider/getTimeline(in:completion:)> method. Modifiers let you specify the families your widget supports, and the details shown when users add or edit their widgets.
Members (0)
This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.
Skipped declarations
2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
StaticConfiguration.body
This protocol needs associated types that cannot yet cross the bridge.
StaticConfiguration.init(kind:provider:content:)
This declaration needs Swift generic type arguments. (no canonical witness for Provider)