1

I am trying to code new lock screen widget introduced with ios 16. I follow the steps on the link below, but new supported families of WidgetFamily class (.accessoryInline, .accessoryCircular, .accessoryRectangular) does not appear. What am I doing wrong?

Here is my code, first 4 family is supported but the last 3 one don't.

@main
struct AppGroupWidget: Widget {
    let kind: String = WidgetKind.appGroupWidget1
    var widgetManager = WidgetManager()
    var body: some WidgetConfiguration {
        StaticConfiguration(kind: kind, provider: Provider()) { entry in
            AppGroupWidgetEntryView(entry: entry).background(Color("WidgetBackground"))
        }
        .configurationDisplayName("Steply")
        .description("Widget description")
        .supportedFamilies([
            .systemSmall,
            .systemMedium,
            .systemLarge,
            .systemExtraLarge,
            .accessoryInline,//'WidgetFamily' has no member 'accessoryInline' so this one is not recognized
            .accessoryCircular,//this one also is not recognized
            .accessoryRectangular//this one also is not recognized
        ])
    }
}
Ömer Karaca
  • 880
  • 1
  • 8
  • 13

1 Answers1

1

It is all about the Xcode version. You have to update your Xcode version to 14.0. And to be able to do this, you should update your macOS to Monterey 12.6

Ömer Karaca
  • 880
  • 1
  • 8
  • 13