nfcndefreadersession

Read UID from NFC mifare tag iOS 13

蹲街弑〆低调 提交于 2020-01-25 08:14:39
问题 I'm trying to read the UID for a mifare tag. Looking at examples, I see the following method a lot: func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) { if case let NFCTag.miFare(tag) = tags.first! { print(tag.identifier as NSData) } } However when putting that into my project, the method is not called. I also noticed xCode giving a warning that this nearly matches an optional protocol which is the same except it uses NFCNDEFTag instead of NFCTag .. When I try