Post

Replies

Boosts

Views

Activity

Reply to How many widgets can i add to an app?
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: @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(_:_:_:_:_:)
Aug ’20