Xcode 15 and iOS 17 now adds extra padding to widget content, which is inconsistent with iOS 16.
Run on iOS 16:
Same code run on iOS 17, with extra paddings:
struct WidgetView : View {
var entry: Provider.Entry
var body: some View {
LicenseView(entry: entry)
.background(Color("WidgetBackground"))
.modifier {
if #available(iOS 17.0, *) {
$0.containerBackground(for: .widget) {
Color.white // to highlight the padding on iOS 17
}
} else {
$0
}
}
}
}