I have an accessoryCircular Lock Screen widget built for iOS 16:
ZStack {
AccessoryWidgetBackground()
VStack {
Text("MON")
.font(.caption)
Text("6")
.font(.title)
}
}
When run on iOS 17 it renders an error “Please adopt containerBackground API”. So I changed it to:
VStack {
Text("MON")
.font(.caption)
Text("6")
.font(.title)
}
.containerBackground(for: .widget) {
AccessoryWidgetBackground()
}
This causes the error to go away but the circular background is no longer visible (tested with iPadOS 17b2). What’s the right way to implement this?