When I use Xcode15 create complications with Apple Watch, getLocalizableSampleTemplate not display as expected, how to fix this error?
Expect the code to show the actual effect (without using the WidgetKit framework)
func getLocalizableSampleTemplate(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTemplate?) -> Void) {
if complication.family == .graphicCircular {
let template = CLKComplicationTemplateGraphicCircularView(
Circle()
.foregroundColor(Color.red)
)
handler(template)
} else {
let template = CLKComplicationTemplateGraphicRectangularFullView(
Circle()
.foregroundColor(Color.red)
)
handler(template)
}
}
