I'm trying to modify a ShieldConfigurationExtension, but am having trouble adding an icon. I have tried directly adding a png to the ShieldConfiguration extension folder and creating a UIImage from it, but it doesn't seem to work. Am I working with images within an extension properly?
This code displays the default configuration
override func configuration(shielding application: Application, in category: ActivityCategory) -> ShieldConfiguration {
// Customize the shield as needed for applications shielded because of their category.
let image = UIImage(named: "icon")
return ShieldConfiguration( icon: image)
}
This code properly displays a customized configuration
return ShieldConfiguration( title: ShieldConfiguration.Label(text: "test", color: .white))