Are you seeing the placeholder representation in the widget on the Home Screen (or the Lock Screen) after you've added it, or when you're about to add it?
Here's the comments I have in the various methods in my IntentTimelineProvider
:
func placeholder(in context: Context) -> EventEntry {
// When WidgetKit displays your widget for the first time, it renders the widget's view as a placeholder, which displays a
// generic representation of your widget, giving the user a general idea of what the widget shows. WidgetKit calls this
// method to request an entry representing the widget's placeholder configuration. In addition, WidgetKit may render your
// widget as a placeholder if the user chooses to hide sensitive information on Apple Watch.
// For the placeholder, the system automatically redacts all of the widget's content, unless you explicitly mark items with the
// unredacted() view modifier in your widget's SwiftUI view. As a result, you may want to provide generic data that fills
// out the redacted version.
...
}
func getSnapshot(for configuration: DynamicEventSelectionIntent, in context: Context, completion: @escaping (EventEntry) -> Void) {
// For the snapshot, return a single entry. In general, you want to return the current state of your app.
// However, the system also uses the snapshot when displaying your widget in the widget picker.
...
}
Maybe your content is taking too long to be delivered and displayed? Or perhaps your content needs the .unredacted()
modifier on it?