2202638_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2202638_en-US

2202638_en-US

Using Taplinx library on iOS with Desfire EV2/EV3 tags

Dear Team,

I am developing an application to format and read data from a DESFire EV3 16KB card.

I followed the UG10045 guide and successfully added both TapLinx and J2ObjC libraries as instructed.

I also disabled the "Debug executable" option in my application map. Passed the license verification step.

However, when I send the SelectApplication or GetFreeMemory command, I get the error as below.

I would love to get some help or guidance to resolve this issue.

Thank you very much,
Manh Vu
Vimass

class ViewController: UIViewController, NFCTagReaderSessionDelegate  {
    
    let licenseKey = "..."
    let licenseKeyLocal = "..."
    
    @IBAction func nfcAction(_ sender: Any) {
        print("nfcAction")
        var tagReaderSession: NFCTagReaderSession!
        tagReaderSession = NFCTagReaderSession(pollingOption: [.iso14443, .iso15693], delegate: self)
        tagReaderSession.alertMessage = "begin scan nfc"
        tagReaderSession.begin()
    }
    
    func tagReaderSessionDidBecomeActive(_ session: NFCTagReaderSession) {
        print("tagReaderSessionDidBecomeActive")
    }
    
    func tagReaderSession(_ session: NFCTagReaderSession, didInvalidateWithError error: any Error) {
        print("tagReaderSession " + error.localizedDescription)
    }
    
    func tagReaderSession(_ session: NFCTagReaderSession, didDetect tags: [NFCTag]) {
        guard let firstTag = tags.first else {
            session.invalidate(errorMessage: "ok nfc")
            return
        }
        
        session.connect(to: firstTag){
            (error: Error?) in
            switch firstTag {
            case .iso7816(let tag):
                self.libraryManager.getDESFireEV3Instance().selectApplication(withAppID: 0) { isSS in
                    print("result selectApplication: \(isSS)")
                }
                
                self.libraryManager.getDESFireEV3Instance().getFreeMemoryonCompletion { data, isSS in
                    print("result getFreeMemoryonCompletion: \(isSS) - \(data)")
                }
                break
            case .feliCa(_):
                print("feliCa card 1")
                break
            case .iso15693(_):
                print("iso15693 card 1")
                break
            case .miFare(_):
                print("miFare card 1")
                break
            @Unknown default:
                print("unknow card 1")
                break
            }
        }
        
    }
    
    
    //
    var tapLinxLibrary: TapLinxLibrary = TapLinxLibrary.shared()
    var libraryManager : TLLibraryManager!
    
    
    func initializeTapLinx() {
        tapLinxLibrary.verifyLicense(licenseKey) { isSS, res in
            if (isSS) {
                print("onl TapLinx initialized successfully " + res)
                self.libraryManager = TLLibraryManager.shared()
            } else {
                print("onl TapLinx initialized false " + res )
            }
        }
        
        tapLinxLibrary.doLocalVerification(withSignature: licenseKeyLocal) { isSS, res in
            if (isSS) {
                print("TapLinx initialized successfully " + res)
                self.libraryManager = TLLibraryManager.shared()
            } else {
                print("TapLinx initialized false " + res )
            }
            
        }
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        initializeTapLinx()
    }
    
}


error:

onl TapLinx initialized successfully Online license verified successfully, time to explore Taplinx Library
TapLinx initialized successfully License Verified Successfully, Time to explore Taplinx Library
nfcAction
tagReaderSessionDidBecomeActive
Command sent to card : 5A000000
Exception Caught: -[ComNxpNfclibCustomModules apduExchangeWithByteArray:]: unrecognized selector sent to instance 0x3007da160
Caught an exception (
    0   CoreFoundation                      0x00000001a19d1098 47427277-EE15-3C17-AD68-6886B0380B5E + 540824
    1   libobjc.A.dylib                     0x000000019ecd32e4 objc_exception_throw + 88
    2   CoreFoundation                      0x00000001a1ad77c8 47427277-EE15-3C17-AD68-6886B0380B5E + 1615816
    3   CoreFoundation                      0x00000001a196e888 47427277-EE15-3C17-AD68-6886B0380B5E + 137352
    4   CoreFoundation                      0x00000001a196e1b0 _CF_forwarding_prep_0 + 96
    5   VCard.debug.dylib                   0x000000010705fe70 kl0 + 2100
    6   VCard.debug.dylib                   0x0000000106efcbe4 oBo + 820
    7   VCard.debug.dylib                   0x000000010704bee0 nrou + 416
    8   VCard.debug.dylib                   0x0000000106ce2bcc -[TL_DESFireEV3 selectApplicationWithAppID:onCompletion:] + 52
    9   VCard.debug.dylib                   0x00000001068f67ec $s5VCard14ViewControllerC16tagReaderSession_9didDetectySo06NFCTageF0C_Say7CoreNFC0I0OGtFys5Error_pSgcfU_ + 704
    10  CoreNFC                             0x000000023c6be28c D938B7C1-5EC0-3CFC-94A2-00A56583760B + 270988
    11  CoreNFC                             0x000000023c68d198 D938B7C1-5EC0-3CFC-94A2-00A56583760B + 70040
    12  libdispatch.dylib                   0x00000001a9648370 B8C15E69-D076-317D-9296-1279500738FC + 9072
    13  libdispatch.dylib                   0x00000001a964a0d0 B8C15E69-D076-317D-9296-1279500738FC + 16592
    14  libdispatch.dylib                   0x00000001a96516d8 B8C15E69-D076-317D-9296-1279500738FC + 46808
    15  libdispatch.dylib                   0x00000001a9652214 B8C15E69-D076-317D-9296-1279500738FC + 49684
    16  libdispatch.dylib                   0x00000001a965d258 B8C15E69-D076-317D-9296-1279500738FC + 94808
    17  libdispatch.dylib                   0x00000001a965caa4 B8C15E69-D076-317D-9296-1279500738FC + 92836
    18  libsystem_pthread.dylib             0x0000000228d1bc7c _pthread_wqthread + 288
    19  libsystem_pthread.dylib             0x0000000228d18488 start_wqthread + 8
)
result selectApplication: false
Command sent to card : 6E
Exception Caught: -[ComNxpNfclibCustomModules apduExchangeWithByteArray:]: unrecognized selector sent to instance 0x3007da160
Caught an exception (
    0   CoreFoundation                      0x00000001a19d1098 47427277-EE15-3C17-AD68-6886B0380B5E + 540824
    1   libobjc.A.dylib                     0x000000019ecd32e4 objc_exception_throw + 88
    2   CoreFoundation                      0x00000001a1ad77c8 47427277-EE15-3C17-AD68-6886B0380B5E + 1615816
    3   CoreFoundation                      0x00000001a196e888 47427277-EE15-3C17-AD68-6886B0380B5E + 137352
    4   CoreFoundation                      0x00000001a196e1b0 _CF_forwarding_prep_0 + 96
    5   VCard.debug.dylib                   0x000000010705fe70 kl0 + 2100
    6   VCard.debug.dylib                   0x0000000106f18f7c CQPYCiZw + 164
    7   VCard.debug.dylib                   0x000000010707ffb8 DiaUpCq + 216
    8   VCard.debug.dylib                   0x0000000106ce53e0 -[TL_DESFireEV3 getFreeMemoryonCompletion:] + 44
    9   VCard.debug.dylib                   0x00000001068f693c $s5VCard14ViewControllerC16tagReaderSession_9didDetectySo06NFCTageF0C_Say7CoreNFC0I0OGtFys5Error_pSgcfU_ + 1040
    10  CoreNFC                             0x000000023c6be28c D938B7C1-5EC0-3CFC-94A2-00A56583760B + 270988
    11  CoreNFC                             0x000000023c68d198 D938B7C1-5EC0-3CFC-94A2-00A56583760B + 70040
    12  libdispatch.dylib                   0x00000001a9648370 B8C15E69-D076-317D-9296-1279500738FC + 9072
    13  libdispatch.dylib                   0x00000001a964a0d0 B8C15E69-D076-317D-9296-1279500738FC + 16592
    14  libdispatch.dylib                   0x00000001a96516d8 B8C15E69-D076-317D-9296-1279500738FC + 46808
    15  libdispatch.dylib                   0x00000001a9652214 B8C15E69-D076-317D-9296-1279500738FC + 49684
    16  libdispatch.dylib                   0x00000001a965d258 B8C15E69-D076-317D-9296-1279500738FC + 94808
    17  libdispatch.dylib                   0x00000001a965caa4 B8C15E69-D076-317D-9296-1279500738FC + 92836
    18  libsystem_pthread.dylib             0x0000000228d1bc7c _pthread_wqthread + 288
    19  libsystem_pthread.dylib             0x0000000228d18488 start_wqthread + 8
)
result getFreeMemoryonCompletion: false - 0
tagReaderSession Session invalidated by user

Code examplesGetting Started
タグ(1)
評価なし
バージョン履歴
最終更新日:
‎11-21-2025 04:48 AM
更新者: