Meluha
Meluha

Reputation: 1566

how to bring a Widget snapshot in "Add Widget" list?

How can we add a widget snapshot in "Add Widget" list as I have marked in red below?

Once I create a widget I can see my app available under the list however not able to make it appear as a snapshot or image. Any help will be appreciated.

struct ToDoLockScreenWidget: Widget {
let kind: String = "Lock Screen Widget"
var body: some WidgetConfiguration {
    if #available(iOSApplicationExtension 16.0, *) {
        return StaticConfiguration(kind: kind, provider: Provider()) { entry in
            ToDoLockScreenWidgetView(entry: entry)
                .widgetURL(URL(string: WidgetURL.lockScreenWidget))
        }
        .supportedFamilies([.accessoryCircular])
        
    } else {
        // Fallback on earlier versions
        return EmptyWidgetConfiguration()
    }

}

thank you. enter image description here

Upvotes: 0

Views: 452

Answers (0)

Related Questions