How many widgets can i add to an app?

How many widgets can i add to an app?
What's the upper limit?

Replies

I'm not sure if there's a hard upper limit, but at some point usability or discoverability will be an issue for users. Users swipe through the widgets that your app offers in the gallery and if there are a lot it may be frustrating for users to find the widget that's useful to them.

How many are you considering having in your app? What would they all do?
I’d like to know as well.

I'm not sure if there's a hard upper limit, but at some point usability or discoverability will be an issue for users. Users swipe through the widgets that your app offers in the gallery and if there are a lot it may be frustrating for users to find the widget that's useful to them. 
How many are you considering having in your app? What would they all do?

Can developer build an app that has a collection of widgets?Like Health Gallery, Quick Launch or Shortcuts? Or more themes? I'm not sure how it could take that number of widgets goes.



5 widgets , each widget with three different families small, medium and large
I also ran into the limit of 5 widgets passed to a WidgetBundleBuilder [1], but there is a workaround. If you wish to have more than five widgets, you can create a second WidgetBundle and use its body as one of the entries in the @main WidgetBundle's body:

Code Block
@main
struct WidgetKitExtension: WidgetBundle {
 @WidgetBundleBuilder
 var body: some Widget {
  MyWidgetOne()
  MyWidgetTwo()
  MyWidgetThree()
  MyWidgetFour()
  MyBundle().body
 }
}
struct MyBundle: WidgetBundle {
 @WidgetBundleBuilder
 var body: some Widget {
  MyWidgetFive()
  MyWidgetSix()
  MyWidgetSeven()
 }
}

I verified that the system displayed all seven widget types when adding a new widget.

[1] https://developer.apple.com/documentation/swiftui/widgetbundlebuilder/buildblock(_:_:_:_:_:)
The solution mentioned below works fine for me. Many thanks!