---
title: "localIdentity(_:)"
framework: Network
role: symbol
role_heading: Instance Method
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+, watchOS 27.0+]
path: "network/dtls/localidentity(_:)"
---

# localIdentity(_:)

Set the local identity DTLS uses during the handshake.

## Declaration

```swift
func localIdentity(_ identity: sec_identity_t) -> DTLS
```

## Parameters

- `identity`: The local identity to be used during the DTLS handshake.
