App Intent snippet view does't able to fetch color for xcassets.

We have an existing app in which we have implemented AppShortcuts. The snippet view works fine in iOS 17 while in iOS18 beta, it doesn't able to fetch color from xcassets. If we use system colours or UIColor it's working fine.

Not working

Color("progressColor")

Working

Color(uiColor: UIColor(named: "progressColor")!)
Color.red
Color(hex: "3881d3") //  Note: We created Color extension to generate color from hex string.

Same issue here

Probably related: the snippet view doesn't seem to have access to any SwiftUI environment stuff either (for example @Environment(\.colorScheme) var colorScheme always returns light inside the snippet view)

Reported to Apple (ages ago!) as FB15122943 but it hasn't been acknowledged, which is exactly what I expected. Why even have public radars if they're always ignored until there's enough public outrage for a manager to hear about it independently.

Would be really nice if this basic functionality could be restored.

@mehulFunnmedia did you manage to find a workaround in the end? Getting sick of users complaining their shortcuts are unreadable!

@MrBran4 . No not found any solution. May be you can always show your UI according to light theme

App Intent snippet view does't able to fetch color for xcassets.
 
 
Q