mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-13 16:53:29 +01:00
Adds iOS 16 Lock Screen widget
This commit is contained in:
@@ -173,8 +173,7 @@ struct Provider: IntentTimelineProvider
|
||||
}
|
||||
}
|
||||
|
||||
@main
|
||||
struct AltWidget: Widget
|
||||
struct HomeScreenWidget: Widget
|
||||
{
|
||||
private let kind: String = "AppDetail"
|
||||
|
||||
@@ -189,3 +188,35 @@ struct AltWidget: Widget
|
||||
.description("View remaining days until your sideloaded apps expire.")
|
||||
}
|
||||
}
|
||||
|
||||
struct LockScreenWidget: Widget
|
||||
{
|
||||
private let kind: String = "LockAppDetail"
|
||||
|
||||
public var body: some WidgetConfiguration {
|
||||
if #available(iOSApplicationExtension 16, *)
|
||||
{
|
||||
return IntentConfiguration(kind: kind,
|
||||
intent: ViewAppIntent.self,
|
||||
provider: Provider()) { (entry) in
|
||||
ComplicationView(entry: entry)
|
||||
}
|
||||
.supportedFamilies([.accessoryCircular])
|
||||
.configurationDisplayName("AltWidget")
|
||||
.description("View remaining days until AltStore expires.")
|
||||
}
|
||||
else
|
||||
{
|
||||
return EmptyWidgetConfiguration()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@main
|
||||
struct AltWidgets: WidgetBundle
|
||||
{
|
||||
var body: some Widget {
|
||||
HomeScreenWidget()
|
||||
LockScreenWidget()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user