Unable to set the new App Tint Color options for App Shortcuts

I'm working on creating App Shortcuts for my app to show up in the Shortcuts app and Spotlight. One new feature this year is the option to add your apps tint color as a background, but I'm not able to get this to work.

I have added the items NSAppIconActionTintColorName (String) and NSAppIconComplementingColorNames (Array?) to my info.plist file that where briefly mentioned in the WWDC23 video, but they don't seem to have any effect.

Has anyone got these to work in their project?

Accepted Reply

After a bit of help on Twitter, here's how to get this working:

  1. Add the shortTitle and systemImageName parameters in your AppShortcut(). If none of your shortcuts have this, the coloured panel won't appear in Shortcuts app. The system image name is from SF Symbols.

  2. Create colours in your main app's asset catalog (e.g. ShortcutsBackground1, ShortcutsBackground2 and ShortcutsForeground

  3. Now add NSAppIconActionTintColorName and NSAppIconComplementingColorNames in your Info.plist. This needs to go within CFBundlePrimaryIcon.

For example:

<dict>
    .....
    <key>CFBundleIcons</key>
    <dict>
		<key>CFBundlePrimaryIcon</key>
		<dict>
            ....

			<key>NSAppIconActionTintColorName</key>
			<string>ShortcutsForeground</string>
			<key>NSAppIconComplementingColorNames</key>
			<array>
				<string>ShortcutsBackground1</string>
				<string>ShortcutsBackground2</string>
			</array>
		</dict>
    </dict>
</dict>
  • This worked on iPhone but isn't working on iPad. Is there more we need to do?

  • How to set our own images for shortcuts rather than using SF symbols?

  • For some reason I can’t get this to work. Do I need to define the other CFBundlePrimaryIcon keys as well? And I have to use bot new NSAppIconActionTintColorName and NSAppIconComplementingColorNames keys?

Replies

I'm not sure they are available in the current betas and there is no documentation at the moment other than that part of the WWDC video. I also find it strange that these are plist keys when App Shortcuts / App Intents has been focussed on moving everything to swift. Maybe we will get these as some static vars on AppShortcutsProvider in a future beta instead of plist keys?

  • I'm also trying to figure this out. Some thoughts/questions raised:

    Does it uses ShortcutTileColor values for this colour, or hex codes, or the name of a icon in asset catalog, or something else?Does it require things like systemImageName to be specified for the Shortcut?Which images are used for systemImageName? SF Symbols? The Shortcuts app has its own set of icons. If it's these icons and not SF symbols, is there a list somewhere?
Add a Comment

After a bit of help on Twitter, here's how to get this working:

  1. Add the shortTitle and systemImageName parameters in your AppShortcut(). If none of your shortcuts have this, the coloured panel won't appear in Shortcuts app. The system image name is from SF Symbols.

  2. Create colours in your main app's asset catalog (e.g. ShortcutsBackground1, ShortcutsBackground2 and ShortcutsForeground

  3. Now add NSAppIconActionTintColorName and NSAppIconComplementingColorNames in your Info.plist. This needs to go within CFBundlePrimaryIcon.

For example:

<dict>
    .....
    <key>CFBundleIcons</key>
    <dict>
		<key>CFBundlePrimaryIcon</key>
		<dict>
            ....

			<key>NSAppIconActionTintColorName</key>
			<string>ShortcutsForeground</string>
			<key>NSAppIconComplementingColorNames</key>
			<array>
				<string>ShortcutsBackground1</string>
				<string>ShortcutsBackground2</string>
			</array>
		</dict>
    </dict>
</dict>
  • This worked on iPhone but isn't working on iPad. Is there more we need to do?

  • How to set our own images for shortcuts rather than using SF symbols?

  • For some reason I can’t get this to work. Do I need to define the other CFBundlePrimaryIcon keys as well? And I have to use bot new NSAppIconActionTintColorName and NSAppIconComplementingColorNames keys?