Xcode duplicates home screen widgets

Xcode 14.1, iOS 16.1, MacOS 12.5,

Working on a Lock Screen widget with home screen widget.

This code: struct Battery_LevelEntryView : View {

@Environment(\.widgetFamily) var widgetFamily

    var entry: Provider.Entry     var body: some View {

switch widgetFamily{

		case .systemSmall:
               ...
      case ... :

If I include the .systemSmall case, each time I run the app on the iPhone, it adds an additional home screen widget, rather than replacing the first home screen widget.

Xcode duplicates home screen widgets
 
 
Q