Can an iOS app read a tag's identifier?
Yes, through a tag session. MIFARE, ISO 7816 and ISO 15693 tags expose an identifier property, the unique hardware identifier in big endian byte order, and a FeliCa tag exposes its IDm. An NDEF session gives no identifier at all. In every case the value tells tags apart and proves nothing about them.
Where the identifier is
Each tag type a tag session delivers carries its own property. NFCMiFareTag, NFCISO7816Tag and NFCISO15693Tag expose identifier, which Apple's reference describes as the unique hardware identifier of the tag, in big endian byte order.
FeliCa differs. NFCFeliCaTag exposes currentIDm, the manufacturer identifier of the system currently selected, which the reference says is updated at each polling command and empty when the selection fails.
ISO 15693 tags add icManufacturerCode and icSerialNumber, and ISO 7816 and MIFARE tags their historical bytes.
Not in an NDEF session
NFCNDEFTag, the protocol an NDEF session delivers, exposes availability, status and the message, and no identifier. An app that needs it opens a tag session, with the declarations covered on the declarations page.
Keep the value as bytes, in the order the reference gives, before comparing it with identifiers read elsewhere. A comparison of hexadecimal strings written in two different orders fails on the same tag.
What it is good for
An identifier tells two tags apart. It serves a register of deployed tags, the record of which tag holds what, or a check that the tag in hand is the one the app expects before it writes.
What it does not prove
Any reader obtains the identifier in the clear, so it cannot show that a tag is genuine. The credential page explains why a system that trusts it can be fooled, and the authenticity page what does prove a tag genuine.
Frequently asked questions
Can an NDEF session read the identifier?
No. NFCNDEFTag exposes no identifier, so open a tag session to read it.
What byte order is the identifier in?
Big endian, according to Apple's reference for MIFARE, ISO 7816 and ISO 15693 tags.
Does a FeliCa tag have an identifier?
It exposes currentIDm, the manufacturer identifier of the selected system, which is empty when the selection fails.
Can the identifier authenticate a tag?
No. Any reader obtains it in the clear, so it proves nothing about the tag's origin; authentication needs a chip that answers a cryptographic challenge.