AppShortcuts limit for 10 shortcuts

Hi, according this WWDC session https://developer.apple.com/wwdc22/10170

App Shortcuts are defined in Swift code, by implementing the AppShortcutsProvider protocol. To implement the protocol, I'll simply create a single getter that returns all the app shortcuts I want to set up for the user. Note that in total, your app can have a maximum of 10 app shortcuts. However, most apps only need a few.

there is a limit for up to 10 AppShortcuts. Could you please clarify how that limit handled? 🤔 (e.g. project failed to build / app will crash or malfunction / only 10 shortcuts will be handled on random/ordered choice by iOS) I suppose there is some way to manage shortcuts amount but see no details at documentation yet.

Post not yet marked as solved Up vote post of vk_arc Down vote post of vk_arc
1.9k views

Replies

My test results: I modified the Food track demo app so now it provides 11 shortcuts and all of these are visible at Shortcuts app (so build and app launch not failed too for sure) - so does the limit really works? 🤔

side note: order of shortcuts at the Shortcuts app looks "random" like - is it possible to provide some special order? 🤔

IMO, because AppShortcutsProvider.appShortcuts is the result builder, it depends on the spec of the builder. AFAIK, there's no explicit limitation on the number of components in the builder block.

I see Tesla and Porsche apps have more than 10 shortcuts. I get a compile error when trying to add more than 10. Anyone know how they do it?

I'd also be interested in finding out how to add more than 10, for example the Actions app has a lot more than 10