<!--
{
  "availability" : [
    "iOS: 27.3.0 -",
    "iPadOS: 27.3.0 -",
    "macCatalyst: 27.3.0 -",
    "macOS: 27.3.0 -",
    "tvOS: 27.3.0 -",
    "visionOS: 27.3.0 -",
    "watchOS: 27.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntentsTesting",
  "identifier" : "/documentation/AppIntentsTesting/IntentValueExpectationCallable/dynamicallyCall(withKeywordArguments:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "App Intents Testing"
    ],
    "preciseIdentifier" : "s:17AppIntentsTesting30IntentValueExpectationCallableV15dynamicallyCall20withKeywordArgumentsq_s03KeyE5PairsVySSxSgG_tF"
  },
  "title" : "dynamicallyCall(withKeywordArguments:)"
}
-->

# dynamicallyCall(withKeywordArguments:)

Creates an expectation from value expectations that you label with
parameter or property names.

```
func dynamicallyCall(withKeywordArguments args: KeyValuePairs<String, Argument?>) -> Expectation
```

## Parameters

`args`

The value expectations, keyed by argument label. A
`nil` value leaves the corresponding parameter or property unchecked.

## Return Value

An expectation that checks each labeled parameter or property
against its value expectation.

## Discussion

You don’t call this method directly. Swift calls it when you call the
callable with labeled arguments. Give every argument a label, and use
each label only once; otherwise, the method stops with a precondition
failure.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)