<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreNFC",
  "identifier" : "/documentation/CoreNFC/NFCNDEFPayload/init(format:type:identifier:payload:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core NFC"
    ],
    "preciseIdentifier" : "c:objc(cs)NFCNDEFPayload(im)initWithFormat:type:identifier:payload:"
  },
  "title" : "init(format:type:identifier:payload:)"
}
-->

# init(format:type:identifier:payload:)

Creates a payload record with the specified format, type, identifier, and payload data.

```
init(format: NFCTypeNameFormat, type: Data, identifier: Data, payload: Data)
```

## Parameters

`format`

A NFC type name format value.

`type`

A data object describing the type of payload. If the data is empty, the method excludes this field from the payload record.

`identifier`

A URI reference that identifies the payload. If the data is empty, the method excludes this field from the payload record.

`payload`

A data object containing the payload data. If the data is empty, the method excludes this field from the payload record.

## Return Value

A newly initialized payload record object.

## Discussion

This initializer uses the maximum payload chunk size defined by the NFC NDEF specification, which is 2^32-1 octets. If the payload size is bigger than the maximum size, the initializer splits the record into multiple record chunks.

---

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)