<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreTelephony",
  "identifier" : "/documentation/CoreTelephony/CTQuickSwitchManager/getPhoneNumberState(forSuffix:completion:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Telephony"
    ],
    "preciseIdentifier" : "c:objc(cs)CTQuickSwitchManager(im)getPhoneNumberStateForSuffix:completion:"
  },
  "title" : "getPhoneNumberState(forSuffix:completion:)"
}
-->

# getPhoneNumberState(forSuffix:completion:)

Queries the quick switch state for a phone number whose suffix matches the provided phone number suffix.

```
func getPhoneNumberState(forSuffix phoneNumberSuffix: String, completion completionHandler: @escaping @Sendable (CTQuickSwitchState, (any Error)?) -> Void)
```

```
func phoneNumberState(forSuffix phoneNumberSuffix: String) async throws -> CTQuickSwitchState
```

## Discussion

- Parameters
  - phoneNumberSuffix: The last 4 digits of the phone number to check. The framework presents a person with a consent screen to provide this information to the requesting app. If a person denies consent, the app returns [`CTQuickSwitchState.notEnrolled`](/documentation/CoreTelephony/CTQuickSwitchState/notEnrolled) and no error value.
  - completionHandler: A completion handler the framework calls after processing the request. The parameters the framework passes to the completion handler indicate the [`CTQuickSwitchState`](/documentation/CoreTelephony/CTQuickSwitchState) and an error value that indicates whether the request succeeded, failed, or ended in an unknown state.

## Discussion

The framework presents a person with a consent screen to provide this information to the requesting app. If someone denies consent, the app returns [`CTQuickSwitchState.notEnrolled`](/documentation/CoreTelephony/CTQuickSwitchState/notEnrolled) and no error.

---

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)