Hi there. I build a ControlWidget to let users perform action in the control center.
The Image View inside the ControlWidgetButton
fails to render the images from the Assets. It seems like it can only render Symbols from SFSymbols using the Image(systemName:)
API.
Here is the code to reproduce this issue:
struct LockedCamWidgetExtensionControl: ControlWidget {
var body: some ControlWidgetConfiguration {
StaticControlConfiguration(
kind: "com.juniperphoton.widget.control"
) {
ControlWidgetButton(action: MyAppCaptureIntent()) {
Image(.actionButton)
}
}
.displayName("Launch Camera")
.description("A an example control that launch camera.")
}
}
Note that I can ensure the image can be displayed in the normal Widget in Home Screen and its target also includes the Widget Extension itself.
So is this a feature or a bug? If we can only use the SFSymbols provided by the system, then users are hard to distinguish the difference between apps.
I tested the app built agains Xcode 16 Beta 5 and iOS 18 Developer Beta 6.