Andrei Herford
Andrei Herford

Reputation: 18765

How to change style/design of AppShortcuts in Shortcuts App (tiles vs circle group)

Addind the AppIntent of my app as AppShortcuts to the Shortcuts Apps was easy. This only required an AppShortcutsProvider. However, I am confused how the AppShortcuts are shown in the Shortcuts App. It seems that there are different styles as one can see on this picture.

enter image description here

The only thing I found that might be related to the design is the shortcutTileColor property in the AppShortcutsProvider. However using/changing this property has no effect on how my app's shortcus are shown: On the default gray background / blue icon.

Among the different apps on my devices I cannot see any logic which shortcuts are shown as tiles and which as circle icons. Additionally third party apps use colored background (s. Gola for example on the screenshot) or gradients. So there there has to be a way to change this. But how?

Upvotes: 3

Views: 422

Answers (2)

Shankar
Shankar

Reputation: 119

For this, you need to add the color in Info.plist.

<dict>
 <key>CFBundlePrimaryIcon</key>
 <dict>
     <key>NSAppIconActionTintColorName</key>
     <string>CustomTintColor</string>
     <key>NSAppIconComplementingColorNames</key>
     <array>
         <string>BackgroundGradientColor1</string>
         <string>BackgroundGradientColor2</string>
     </array>
</dict>

Apple Official Documentation: https://developer.apple.com/documentation/bundleresources/information-property-list/cfbundleicons/cfbundleprimaryicon/nsappiconcomplementingcolornames

Upvotes: 0

Kuba
Kuba

Reputation: 1

After much pain I discovered, that you can change style of displaying app shortcut(s) from separate tiles to one tile with many shortcuts in it (like Books in your screenshot) by setting shortTitle parameter in AppShortcut constructor. Still I have no idea, if and how you can set background color for this tile - shortcutTileColor in AppShortcutsProvider does not seem to have any effect.

Upvotes: 0

Related Questions