---
title: "lockAFI(requestFlags:completionHandler:)"
framework: corenfc
role: symbol
role_heading: Instance Method
path: "corenfc/nfciso15693tag/lockafi(requestflags:completionhandler:)"
---

# lockAFI(requestFlags:completionHandler:)

Sends the Lock AFI command (0x28 command code), as defined in the ISO 15693-3 specification, to the tag.

## Declaration

```swift
func lockAFI(requestFlags flags: NFCISO15693RequestFlag, completionHandler: @escaping @Sendable ((any Error)?) -> Void)
```

```swift
func lockAFI(requestFlags flags: NFCISO15693RequestFlag) async throws
```

## See Also

### Sending Application Family Identifier Commands

- [writeAFI(requestFlags:afi:completionHandler:)](corenfc/nfciso15693tag/writeafi(requestflags:afi:completionhandler:).md)
