---
title: "init(_:)"
framework: Siri Evaluations
role: symbol
role_heading: Initializer
platforms: [iOS 27.3+, iPadOS 27.3+, macOS 27.3+, visionOS 27.3+]
path: "sirievaluations/onscreen/init(_:)"
---

# init(_:)

Creates an expectation that each entity in the block is onscreen.

## Declaration

```swift
init(@OnScreenEntityExpectationBuilder _ content: () -> [any ResolvableAppEntityExpectation])
```

## Discussion

Discussion Onscreen entities are identity-based. A staged view shows entities the author already knows, so property matching is not offered here. For property-based matching of search results, see Finds. The following shows how you can use the builder syntax: OnScreen {     EventEntity.expectIdentifier("An identifier") }

## See Also

### Creating an onscreen expectation

- [OnScreenEntityExpectationBuilder](sirievaluations/onscreenentityexpectationbuilder.md)
