So, I'm developing an application that uses the Screen Time API and ManagedSettings to shield applications. I have managed to configure the shield to the way I want it to look, but the icon (UIImage) I am using is not adapting to changes in the device's appearance.
For example, if I set the managed settings and start monitoring the device while in the light appearance, the shield displays itself with the light appearance of the icon. However, when I change the device's appearance to dark, the icon remains in its light appearance, and vice versa. Restarting the monitoring of the device with DeviceActivities forces the icon to change, but that shouldn't be the way it works. Here is my shield configuration:
ShieldConfiguration(
backgroundBlurStyle: UIBlurEffect.Style.systemThickMaterial,
backgroundColor: UIColor.orangeSoda,
icon: UIImage.appIconNoBG,
title: ShieldConfiguration.Label(
text: "Chores",
color: UIColor.orangeSoda),
subtitle: .init(
text: "Sorry, you can't use \(application.localizedDisplayName ?? "this app") because you haven't finished all of your chores.",
color: UIColor.label),
primaryButtonLabel: .init(
text: "Leave App",
color: UIColor.quiteWhite),
primaryButtonBackgroundColor: .orangeSoda
)
Is there a known issue or workaround for this?