What format can the image be in for a ControlWidgetIcon? Can we use .svg and .png? Or does it have to be a systemImage?
In XCode16-beta4 this code worked:
AppIntentControlConfiguration(
kind: WidgetConfig.Constants.controlCenterLock,
provider: Provider()) { value in
ControlWidgetToggle(
"Lock/Unlock",
isOn: !value.isLocked,
action: LockUnlockToggleIntent(),
valueLabel: { isUnlocked in
Label(
isUnlocked ? "Unlocked" : "Locked",
image: isUnlocked ? "controlUnlocked" : "controlLocked")
})
})
Where "controlUnlocked"/"controlLocked" were the names of Assets in the Widget extension asset catalogue.
But in XCode-beta 6, the icons show a question mark. I can only get icons to show by using systemImage
Label(
isUnlocked ? "Unlocked" : "Locked",
systemImage: isUnlocked ? "lock.open": "lock.fill" )
Is it a bug that it isn't loading the icons? Is there a format for the icons? Or are only systemImage icons supported?