I have seen some application having custom images in shortcuts app, but after refreing all the apple documentation and source code im yet to figure out a way to show images. the AppShortcutProvider only supports Sfsymbols as of now. then how come other applications is able to do this ? please advice ?
How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here
Custom icon in Shortcuts App?
I’m also facing the same issue. Does anyone have a solution for this?
Our sample code project shows you how to do this:
Start by looking at this code in the AppShortcutsProvider
:
AppShortcut(intent: GetTrailInfo(), phrases: [
"Get \(\.$trail) conditions with \(.applicationName)",
"Get conditions on \(\.$trail) with \(.applicationName)"
],
shortTitle: "Get Conditions",
systemImageName: "cloud.rainbow.half",
parameterPresentation: ParameterPresentation(
for: \.$trail,
summary: Summary("Get \(\.$trail) conditions"),
optionsCollections: {
OptionsCollection(TrailEntityQuery(), title: "Favorite Trails", systemImageName: "cloud.rainbow.half")
}
))
— Ed Ford, DTS Engineer
@DTS Engineer This implementation will show system icons, not custom ones. However, if you check the first shared screen, it displays custom images for Talabat and Noon apps.
Please see the photos in the one section of my screenshot, and then take a look at the OptionsCollection
example in the sample project.
— Ed Ford, DTS Engineer