---
title: "callAsFunction(_:)"
framework: storekit
role: symbol
role_heading: Instance Method
path: "storekit/displaymessageaction/callasfunction(_:)"
---

# callAsFunction(_:)

Tells StoreKit to display the App Store message, if appropriate.

## Declaration

```swift
@MainActor func callAsFunction(_ message: Message) throws
```

## Parameters

- `message`: The App Store message to display.

## Discussion

Discussion Don’t call this method directly. SwiftUI calls it when you call the DisplayMessageAction structure using message as an argument. For information about how Swift uses the callAsFunction() method to simplify call site syntax, see Methods with Special Names in The Swift Programming Language.
