App Shortcuts

I am trying to implement App Shortcuts for my app. I want to implement the same as Books. I am trying to do 2 things.

  1. I want to set a custom image for each App Shortcut.
  2. I want to set custom color for the Shortcuts background like orange in the Books App Shortcuts.

I am trying to implement in iOS 16. Kindly share your ideas.

If at all possible, kindly share a snippet

Firstly, I believe this is not possible in iOS 16. This API introduced is only available for iOS 17 or later. Secondly, the custom color can be set the Info.plist. Do the following:

<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>

Reference: https://developer.apple.com/forums/thread/732747

App Shortcuts
 
 
Q