From fd8dd20c1b2546e390f7a7b0bac96b0291aba6d7 Mon Sep 17 00:00:00 2001 From: Riley Testut Date: Fri, 18 Aug 2023 18:37:52 -0500 Subject: [PATCH] [AltWidget] Fixes incorrect home screen widget margins on iOS 17 --- AltWidget/AltWidget.swift | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/AltWidget/AltWidget.swift b/AltWidget/AltWidget.swift index 62696399..32c5ef83 100644 --- a/AltWidget/AltWidget.swift +++ b/AltWidget/AltWidget.swift @@ -178,7 +178,7 @@ struct HomeScreenWidget: Widget private let kind: String = "AppDetail" public var body: some WidgetConfiguration { - return IntentConfiguration(kind: kind, + let configuration = IntentConfiguration(kind: kind, intent: ViewAppIntent.self, provider: Provider()) { (entry) in WidgetView(entry: entry) @@ -186,6 +186,16 @@ struct HomeScreenWidget: Widget .supportedFamilies([.systemSmall]) .configurationDisplayName("AltWidget") .description("View remaining days until your sideloaded apps expire.") + + if #available(iOS 17, *) + { + return configuration + .contentMarginsDisabled() + } + else + { + return configuration + } } }