iOS Development

ios – How one can 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 verify this [enter link description here][1].

Each time i do a sendMiFareCommand i get an error “Tag just isn’t linked”. I can learn the tag utilizing an app referred to as NFC instruments and it reveals the tamper standing simply nice.

That is my code:

guard tags.depend > 0,
              let tag = tags.first
        else {
            session.invalidate()
            return
        }
        print("asd tags depend (tags.depend) isAvailable (tag.isAvailable)")
        change tag {
        case .miFare(let miFareTag):
            print("asd household (miFareTag.mifareFamily)")
            let readBlock4: [UInt8] = [0xff, 0x00]
            print("asd 1")
            if #accessible(iOS 14, *) {
                print("asd 2")
                miFareTag.sendMiFareCommand(commandPacket: Information(readBlock4)) { (end result: Consequence<Information, Error>) in
                            print("asd (end result)")
                    
                            change end result {

                            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: Information(readBlock4)) { (response: Information, 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]: How one can get tamper standing of NFC chip utilizing IOS

What's your reaction?

Leave A Reply

Your email address will not be published.