---
title: "getState(_:)"
framework: authenticationservices
role: symbol
role_heading: Instance Method
path: "authenticationservices/ascredentialidentitystore/getstate(_:)"
---

# getState(_:)

Gets the state of the credential identity store.

## Declaration

```swift
func getState(_ completion: @escaping @Sendable (ASCredentialIdentityStoreState) -> Void)
```

```swift
func state() async -> ASCredentialIdentityStoreState
```

## Parameters

- `completion`: A block the method calls to return the current identity store state.

## Discussion

Discussion Call this method to find out the current state of the store before attempting to call other store methods. Examine the ASCredentialIdentityStoreState value passed to your completion handler to find out whether the store is enabled and whether it supports incremental updates.

## See Also

### Checking the state of the store

- [ASCredentialIdentityStoreState](authenticationservices/ascredentialidentitystorestate.md)
