I'm trying to add a widget to my SwiftUI Application. I've made a Widget Extension in my App. Upon running the target in the simulator, this error appears in the console:
The line that Xcode brings my attention to is this:
The whole code for my timeline provider and entry:
Any help would be appreciated :)
Code Block ClipperWidgetExtension[7343:594354] Fatal error: PlatformViewRepresentableAdaptor<ListRepresentable<SystemListDataSource<Never>, SelectionManagerBox<Never>>>: file /Library/Caches/com.apple.xbs/Sources/Chrono_Sim/Chrono-63.5/WidgetKit/SPI/WidgetViewArchive.swift, line 254
The line that Xcode brings my attention to is this:
Code Block completion(Timeline(entries: [SimpleEntry()], policy: .never))
The whole code for my timeline provider and entry:
Code Block struct Provider: TimelineProvider { public typealias Entry = SimpleEntry public func snapshot(with context: Context, completion: @escaping (SimpleEntry) -> ()) { let entry = SimpleEntry() completion(entry) } public func timeline(with context: Context, completion: @escaping (Timeline<Entry>) -> ()) { completion(Timeline(entries: [SimpleEntry()], policy: .never)) } } struct SimpleEntry: TimelineEntry { var date: Date = Date() }
Any help would be appreciated :)