Post

Replies

Boosts

Views

Activity

Reply to Xcode preview for Widget?
Thanks for getting back to me! The error is: “Cannot Preview in this file - Unexpected error occurred” and then the usual [Try Again] and the [Diagnostics] buttons come up. When choosing the latter, the following error appears: ”Remote Human Readable Error:  PreviewAgentError: Statically rendering previews is not supported on iOS Simulators” Granted, I am using the default Hello Word Placeholder in the PreviewProvider, but when I tried to change this to mirror the WWDC2020 Video Code along, I get the same error. I am attaching the said code for the project to this message. If you have any other questions, please let me know. Dan Uff Actual Widget Code - https://developer.apple.com/forums/content/attachment/4c8b89b2-c8b8-4cf7-8468-009b8fb4296a } @main struct CPCWidget: Widget {     private let kind: String = "CPCWidget"     public var body: some WidgetConfiguration {       StaticConfiguration(kind: "com.connectingpeoplesoftware.cpclockwidget",                           provider: Provider(),                           placeholder: PlaceholderView()) { entry in                           CPCWidgetEntryView(entry: entry)         }         .configurationDisplayName("CPClock")         .description("CPClock in widget form.")       .supportedFamilies([.systemSmall, .systemMedium, .systemLarge])            }    } struct CPCWidgetPreviews: PreviewProvider {   static var previews: some View {     /*@STARTMENUTOKEN@*/Text("Hello, World!")/*@ENDMENU_TOKEN@*/   } } ```
Jul ’20