iosswiftuiwidget

How to group two lock screen widgets so that they appear in the same page of the widget gallery like the widgets of the system Sleep app?


How can I group two lock screen widgets so that they appear in the same page of the widget gallery?

Below's the snapshot of the widgets of the system Sleep app showing at the lock screen widget gallery. I've tried assign the same kind to widgets, also tried using the WidgetBundleBuilder to return widgets as a single widget, but not working.

a


Solution

  • To get the desired behavior, your widgets must actually be the same widget but with different widgetFamily.