<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AuthenticationServices",
  "identifier" : "/documentation/AuthenticationServices/ASCredentialProviderExtensionContext/completeRequest(withTextToInsert:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Authentication Services"
    ],
    "preciseIdentifier" : "c:objc(cs)ASCredentialProviderExtensionContext(im)completeRequestWithTextToInsert:completionHandler:"
  },
  "title" : "completeRequest(withTextToInsert:completionHandler:)"
}
-->

# completeRequest(withTextToInsert:completionHandler:)

Provides the user-selected text.

```
func completeRequest(withTextToInsert text: String, completionHandler: (@Sendable (Bool) -> Void)? = nil)
```

## Parameters

`text`

The text to insert.

`completionHandler`

Optional work that the extension performs as a background-priority task after the request completes. The `expired` parameter is `YES` if the system prematurely terminates a previous non-expiration invocation of the `completionHandler`.

## Overview

At some point after you call this method, the system dismisses the associated view controller.

---

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)