I can't seem to make my watch WidgetKit complication to show while the device is locked. This is done in the weather complication and can be seen if you take off your watch and set it down, but my widget is redacted until unlocked.
I tried adding .unredacted
to my root widget view but same behaviour. Is this something I can do from the app code or is this only controlled by the user? I don't remember setting this on the weather complication so I thought it set itself as public which is what I would like to do. It is not clear how to achieve this in the docs.
I found a hint to the solution in this post. Since I did not completely understand it, I tried some ideas and found a working solution for a single widget. An extension to multiple widgets in a widget family should work accordingly.
@main
struct ShopEasy_Widgets: Widget {
let kind: String = "ShopEasy__WidgetKit_Extension"
var body: some WidgetConfiguration {
StaticConfiguration(kind: kind, provider: Provider()) { entry in
ShopEasy_WidgetKitsEntryView(entry: entry)
.unredacted()
}
.supportedFamilies([.accessoryCircular, .accessoryInline, .accessoryRectangular, .accessoryCorner])
}
}