You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
JustOneThing/WidgetShared/SystemWidget.swift

26 lines
739 B

//
// JustOneThingWidget.swift
// JustOneThing
//
// Created by Alan Francis on 11/06/2023.
//
import SwiftUI
import WidgetKit
import Intents
struct JustOneThingSystemWidget: Widget {
let kind: String = "JustOneThingSystemWidget"
let persistenceController = PersistenceController.shared
var body: some WidgetConfiguration {
IntentConfiguration(kind: kind,
intent: ConfigurationIntent.self,
provider: ThingProvider()) { entry in
ThingView(thing: entry.thing)
}
.configurationDisplayName("Just One Thing")
.description("Show a random Thing.")
.supportedFamilies([.systemSmall, .systemMedium, .systemLarge])
}
}