I have an App Intent that conforms to ShowsSnippetView
and returns a view that is shown in the Siri interface after the shortcut runs. The view simply consists of a VStack
with a Text
element, with no special styling. When my device is set to dark mode, the view doesn't adapt: the text is black, but the background of the Siri interface is a transparent dark gray, which makes the text almost unreadable. The text should be white in dark mode. The colorScheme
environment value inside the view corresponds to light mode, even though the device is set to dark mode. This is most likely a bug in iOS.
You should set up your view so that it uses the system's vibrant color constants, so that they automatically adapt in Dark Mode — Design App Shortcuts mentions this. Our sample code project does this in a view for a snippet with the secondary
color modifier (partly shown below), with the Dark Mode results you see in the screenshot.
struct TrailInfoView: View { ... var body: some View { HStack { Spacer() VStack { ... VStack { Text(trail.name) .font(.title) Text(trail.regionDescription) .font(.subheadline) .foregroundColor(.secondary) if includeConditions { Text(trail.currentConditions) .font(.callout) .foregroundColor(.secondary) } } } Spacer() } } }
— Ed Ford, DTS Engineer