---
title: "placeholder(in:)"
framework: widgetkit
role: symbol
role_heading: Instance Method
path: "widgetkit/timelineprovider/placeholder(in:)"
---

# placeholder(in:)

Provides a timeline entry representing a placeholder version of the widget.

## Declaration

```swift
func placeholder(in context: Self.Context) -> Self.Entry
```

## Parameters

- `context`: An object that describes the context in which to show the widget.

## Mentioned in

Migrating ClockKit complications to WidgetKit

## Return Value

Return Value A timeline entry that represents a placeholder version of the widget.

## Discussion

Discussion When WidgetKit displays your widget for the first time, it renders the widget’s view as a placeholder. A placeholder view displays a generic representation of your widget, giving the user a general idea of what the widget shows. WidgetKit calls placeholder(in:) to request an entry representing the widget’s placeholder configuration. For example, the game status widget would implement this method as follows: struct GameStatusProvider: TimelineProvider {     func placeholder(in context: Context) -> SimpleEntry {        GameStatusEntry(date: Date(), gameStatus: "—")     } } In addition, WidgetKit may render your widget as a placeholder if users choose to hide sensitive information on Apple Watch or the iPhone Lock Screen. To learn more about redacting sensitive data, see Creating a widget extension. important: placeholder(in:) is synchronous and returns a TimelineEntry immediately. Return from placeholder(in:) as quickly as possible.

## See Also

### Generating Timelines

- [getSnapshot(in:completion:)](widgetkit/timelineprovider/getsnapshot(in:completion:).md)
- [getTimeline(in:completion:)](widgetkit/timelineprovider/gettimeline(in:completion:).md)
- [Entry](widgetkit/timelineprovider/entry.md)
- [TimelineProvider.Context](widgetkit/timelineprovider/context.md)
