Sunday, September 25, 2022
HomeiOS Developmentios - Easy methods to learn the tamper standing from a NTAG...

ios – Easy methods to learn the tamper standing from a NTAG 213 TT nfc utilizing swift


im making an attempt to learn the tamper standing from a NTAG 213 TT nfc.
I’ve test this [enter link description here][1].

Each time i do a sendMiFareCommand i get an error “Tag is just not related”. I can learn the tag utilizing an app known as NFC instruments and it exhibits the tamper standing simply effective.

That is my code:

guard tags.rely > 0,
              let tag = tags.first
        else {
            session.invalidate()
            return
        }
        print("asd tags rely (tags.rely) isAvailable (tag.isAvailable)")
        swap tag {
        case .miFare(let miFareTag):
            print("asd household (miFareTag.mifareFamily)")
            let readBlock4: [UInt8] = [0xA4, 0x00]
            print("asd 1")
            if #accessible(iOS 14, *) {
                print("asd 2")
                miFareTag.sendMiFareCommand(commandPacket: Knowledge(readBlock4)) { (outcome: End result<Knowledge, Error>) in
                            print("asd (outcome)")
                    
                            swap outcome {

                            case .success(let response):
                                print("asd bem aqui 1 (response)")
                            case .failure(let error):
                                print("asd 1 Learn tag error: (error.localizedDescription). Please strive once more.")
                            }

                        }

                    } else {
                        print("asd 3")
                        miFareTag.sendMiFareCommand(commandPacket: Knowledge(readBlock4)) { (response: Knowledge, optionalError: Error?) in
                            guard let error = optionalError else {
                                print("asd deu bem aqui 2")
                                return
                            }
                           print("asd 2 Learn tag error: (error.localizedDescription). Please strive once more.")

                        }

                    }
            print("---")

Thanks for the assistance.
[1]: Easy methods to get tamper standing of NFC chip utilizing IOS

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments