Taplinx iOS appcrash on tag response

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Taplinx iOS appcrash on tag response

跳至解决方案
2,323 次查看
DamianD
Contributor III

Hi, i followed UG10045.pdf and created ios application. I created ApduExchangeWithByteArray method and implemented its contents. However when send back response from tag back to taplinx library, application crashes with following entries from device log:

Time	Device Name	Type	PID	Tag	Message
Nov  6 20:44:31	iPhone	Notice	5223	MobileFacilityApp	Command Set - 1
Nov  6 20:44:31	iPhone	Notice	5223	MobileFacilityApp	Command Set - Native
Nov  6 20:44:31	iPhone	Error	0	kernel(Sandbox)	Sandbox: MobileFacilityApp(5223) deny(1) sysctl-read kern.bootargs
Nov  6 20:44:38	iPhone	Notice	5223	MobileFacilityApp(UIKitCore)	Received memory warning.
Nov  6 20:44:38	iPhone	Notice	5223	MobileFacilityApp(UIKitCore)	Received memory warning.
Nov  6 20:44:40	iPhone	Notice	0	kernel	EXC_RESOURCE -> MobileFacilityApp[5223] exceeded mem limit: InactiveHard 3072 MB (fatal)
Nov  6 20:44:40	iPhone	Notice	0	kernel	memorystatus: killing process 5223 [MobileFacilityApp] in high band FOREGROUND (100) - memorystatus_available_pages: 44859

 

When i sent back empty response back to taplinx library (just TL_TagAPDUResponse without setting ResponseData) - app does not crash and i get error about incomplete response (which is expected). What am i doing wrong?  

0 项奖励
回复
1 解答
2,282 次查看
DamianD
Contributor III

apparently included headers in TapLinx-v2.0.0 are all wrong. In TapLinxApduHandler.h we see declaration:

- (nullable TL_TagAPDUResponse *)apduExchangeWithByteArray:(NSData *_Nonnull)apduData;

but in reality we should return IOSByteArray*, otherwise app will crash with aforementioned symptoms

在原帖中查看解决方案

0 项奖励
回复
6 回复数
2,224 次查看
ukcas
NXP Employee
NXP Employee

Hello Damian,

Maybe the cause of the error is some exceeding memory limit and not TapLinx library?

MobileFacilityApp[5223] exceeded mem limit: InactiveHard 3072 MB (fatal)

 

The application which integrates TapLinx Library can be used as following (no need for ApduExchange implementation on top)

Set the delegate to the APDUHandler

let reader = TL_IOSNFCReader(uid: tag.identifier, historicalBytes: tag.historicalBytes ?? Data())

handler = TapLinxApduHandler(reader: reader)

handler.delegate = self

                

libraryManager?.setApduHandlerWithApduHandler(handler)

 

Next Step will be to implement the protocol method inside the application

 

func apduExchange(withByteArray apduData: Data) -> TL_TagAPDUResponse? {

        var tagAPDUResponse: TL_TagAPDUResponse?

       

        if connectedTag != nil {

            // Send Tag Type Native of ISO and the apdu as NFCISO7816APDU

            executeAPDUCommandOn7816Tag(tagType: tagtype, apdu: apdu) { data in

                let appendedData = data


                tagAPDUResponse = TL_TagAPDUResponse(responseData: appendedData, tag: self.currentTag)

                semaphore.signal()

            }

            let _ = semaphore.wait(timeout: .now() + 3.0)

        } else if connectedMifareTag != nil {

            let semaphore = DispatchSemaphore(value: 0)

           

            print("MIFARE CAPDU -> \(apduData.hex)")

           

            executeAPDUCommandOnMIFARETag(apdu: apduData) { data in

                print("RAPDU <- Data: \(data.hex)")

                tagAPDUResponse = TL_TagAPDUResponse(responseData: data, tag: self.currentTag)

                semaphore.signal()

            }

            let _ = semaphore.wait(timeout: .now() + 3.0)

        }

        print("Tag Response \(String(describing: tagAPDUResponse))")

        return tagAPDUResponse

    }

 

Hope this simplification would help you.

 

Best regards,

TapLinx team

0 项奖励
回复
2,221 次查看
DamianD
Contributor III

@ukcas - what version of taplinx ios library is 'current'? Because i have 2.0.0 and it definitely crashes when i return TL_TagAPDUResponse from apduExchange method, it has to be raw IOSByteArray from j2objc library. I'm using c# bindings for taplinx library, but it does not matter in this problem.

0 项奖励
回复
2,222 次查看
DamianD
Contributor III
hi
the crash definietly comes from taplinx library because when i changed
- (nullable TL_TagAPDUResponse *)apduExchangeWithByteArray:(NSData *_Nonnull)apduData;
to actually:
- (nullable IOSByteArray*)apduExchangeWithByteArray:(IOSByteArray*_Nonnull)apduData;
It started working

0 项奖励
回复
2,214 次查看
DamianD
Contributor III
followup - when i changed my implementation to use provided TapLinxApduHandler instead of providing my own - then apduExchangeWithByteArray does conform to contract - (nullable TL_TagAPDUResponse *)apduExchangeWithByteArray:(NSData *_Nonnull)apduData;
0 项奖励
回复
2,279 次查看
DamianD
Contributor III

one more thing - apduData is really also IOSByteArray, not NSData

0 项奖励
回复
2,283 次查看
DamianD
Contributor III

apparently included headers in TapLinx-v2.0.0 are all wrong. In TapLinxApduHandler.h we see declaration:

- (nullable TL_TagAPDUResponse *)apduExchangeWithByteArray:(NSData *_Nonnull)apduData;

but in reality we should return IOSByteArray*, otherwise app will crash with aforementioned symptoms

0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-1989340%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ETaplinx%20iOS%20%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E5%9C%A8%E6%A0%87%E7%AD%BE%E5%93%8D%E5%BA%94%E6%97%B6%E5%B4%A9%E6%BA%83%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1989340%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%82%A8%E5%A5%BD%EF%BC%8C%E6%88%91%E6%8C%89%E7%85%A7%3CSPAN%3EUG10045.pdf%20%E7%9A%84%E8%AF%B4%E6%98%8E%E5%88%9B%E5%BB%BA%E4%BA%86%20iOS%20%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E3%80%82%E6%88%91%E5%88%9B%E5%BB%BA%E4%BA%86%20ApduExchangeWithByteArray%20%E6%96%B9%E6%B3%95%E5%B9%B6%E5%AE%9E%E7%8E%B0%E4%BA%86%E5%85%B6%E5%86%85%E5%AE%B9%E3%80%82%E4%BD%86%E6%98%AF%EF%BC%8C%E5%BD%93%E5%B0%86%E6%A0%87%E7%AD%BE%E7%9A%84%E5%93%8D%E5%BA%94%E5%8F%91%E9%80%81%E5%9B%9E%20Taplinx%20%E5%BA%93%E6%97%B6%EF%BC%8C%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E5%B4%A9%E6%BA%83%E4%BA%86%EF%BC%8C%E8%AE%BE%E5%A4%87%E6%97%A5%E5%BF%97%E4%B8%AD%E6%98%BE%E7%A4%BA%E4%BB%A5%E4%B8%8B%E5%86%85%E5%AE%B9%EF%BC%9A%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%20translate%3D%22no%22%3ETime%09Device%20Name%09Type%09PID%09Tag%09Message%0ANov%20%206%2020%3A44%3A31%09iPhone%09Notice%095223%09MobileFacilityApp%09Command%20Set%20-%201%0ANov%20%206%2020%3A44%3A31%09iPhone%09Notice%095223%09MobileFacilityApp%09Command%20Set%20-%20Native%0ANov%20%206%2020%3A44%3A31%09iPhone%09Error%090%09kernel(Sandbox)%09Sandbox%3A%20MobileFacilityApp(5223)%20deny(1)%20sysctl-read%20kern.bootargs%0ANov%20%206%2020%3A44%3A38%09iPhone%09Notice%095223%09MobileFacilityApp(UIKitCore)%09Received%20memory%20warning.%0ANov%20%206%2020%3A44%3A38%09iPhone%09Notice%095223%09MobileFacilityApp(UIKitCore)%09Received%20memory%20warning.%0ANov%20%206%2020%3A44%3A40%09iPhone%09Notice%090%09kernel%09EXC_RESOURCE%20-%26gt%3B%20MobileFacilityApp%5B5223%5D%20exceeded%20mem%20limit%3A%20InactiveHard%203072%20MB%20(fatal)%0ANov%20%206%2020%3A44%3A40%09iPhone%09Notice%090%09kernel%09memorystatus%3A%20killing%20process%205223%20%5BMobileFacilityApp%5D%20in%20high%20band%20FOREGROUND%20(100)%20-%20memorystatus_available_pages%3A%2044859%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3E%E5%BD%93%E6%88%91%E5%B0%86%E7%A9%BA%E5%93%8D%E5%BA%94%E5%8F%91%E5%9B%9E%20taplinx%20%E5%BA%93%EF%BC%88%E4%BB%85%20TL_TagAPDUResponse%20%E8%80%8C%E6%9C%AA%E8%AE%BE%E7%BD%AE%20ResponseData%EF%BC%89%E6%97%B6%20-%20%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E4%B8%8D%E4%BC%9A%E5%B4%A9%E6%BA%83%EF%BC%8C%E5%B9%B6%E4%B8%94%E6%88%91%E6%94%B6%E5%88%B0%E6%9C%89%E5%85%B3%E5%93%8D%E5%BA%94%E4%B8%8D%E5%AE%8C%E6%95%B4%E7%9A%84%E9%94%99%E8%AF%AF%EF%BC%88%E8%BF%99%E6%98%AF%E9%A2%84%E6%9C%9F%E7%9A%84%EF%BC%89%E3%80%82%E6%88%91%E5%81%9A%E9%94%99%E4%BA%86%E4%BB%80%E4%B9%88%EF%BC%9F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1991088%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9ATaplinx%20iOS%20%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E5%9B%A0%E6%A0%87%E7%AD%BE%E5%93%8D%E5%BA%94%E8%80%8C%E5%B4%A9%E6%BA%83%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1991088%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%90%8E%E7%BB%AD%20-%20%E5%BD%93%E6%88%91%E5%B0%86%E6%88%91%E7%9A%84%E5%AE%9E%E7%8E%B0%E6%9B%B4%E6%94%B9%E4%B8%BA%E4%BD%BF%E7%94%A8%E6%8F%90%E4%BE%9B%E7%9A%84%20TapLinxApduHandler%20%E8%80%8C%E4%B8%8D%E6%98%AF%E6%8F%90%E4%BE%9B%E6%88%91%E8%87%AA%E5%B7%B1%E7%9A%84%E6%97%B6%20-%20%E9%82%A3%E4%B9%88%20apduExchangeWithByteArray%20%E7%A1%AE%E5%AE%9E%E7%AC%A6%E5%90%88%E5%90%88%E5%90%8C%20-%20(nullable%20TL_TagAPDUResponse%20*)apduExchangeWithByteArray%3A(NSData%20*_Nonnull)apduData%3B%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1991063%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9ATaplinx%20iOS%20%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E5%9B%A0%E6%A0%87%E7%AD%BE%E5%93%8D%E5%BA%94%E8%80%8C%E5%B4%A9%E6%BA%83%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1991063%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F169705%22%20target%3D%22_blank%22%3E%40ukcas%3C%2FA%3E%20-%20taplinx%20ios%20%E5%BA%93%E7%9A%84%E5%93%AA%E4%B8%AA%E7%89%88%E6%9C%AC%E6%98%AF%E2%80%9C%E5%BD%93%E5%89%8D%E2%80%9D%E7%89%88%E6%9C%AC%EF%BC%9F%E5%9B%A0%E4%B8%BA%E6%88%91%E4%BD%BF%E7%94%A8%E7%9A%84%E6%98%AF%202.0.0%20%E7%89%88%E6%9C%AC%EF%BC%8C%3CSPAN%3E%E5%BD%93%E6%88%91%E4%BB%8E%20apduExchange%20%E6%96%B9%E6%B3%95%E8%BF%94%E5%9B%9E%20TL_TagAPDUResponse%20%E6%97%B6%EF%BC%8C%E5%AE%83%E8%82%AF%E5%AE%9A%E4%BC%9A%E5%B4%A9%E6%BA%83%EF%BC%8C%E6%89%80%E4%BB%A5%E5%AE%83%E5%BF%85%E9%A1%BB%E6%98%AF%20j2objc%20%E5%BA%93%E4%B8%AD%E7%9A%84%E5%8E%9F%E5%A7%8B%20IOSByteArray%E3%80%82%E6%88%91%E6%AD%A3%E5%9C%A8%E4%BD%BF%E7%94%A8%20taplinx%20%E5%BA%93%E7%9A%84%20c%23%20%E7%BB%91%E5%AE%9A%EF%BC%8C%E4%BD%86%E8%BF%99%E5%9C%A8%E8%BF%99%E4%B8%AA%E9%97%AE%E9%A2%98%E4%B8%8A%E6%97%A0%E5%85%B3%E7%B4%A7%E8%A6%81%E3%80%82%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1991041%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9ATaplinx%20iOS%20%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E5%9B%A0%E6%A0%87%E7%AD%BE%E5%93%8D%E5%BA%94%E8%80%8C%E5%B4%A9%E6%BA%83%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1991041%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E4%BD%A0%E5%A5%BD%3CBR%20%2F%3E%E5%B4%A9%E6%BA%83%E8%82%AF%E5%AE%9A%E6%9D%A5%E8%87%AA%20taplinx%20%E5%BA%93%EF%BC%8C%E5%9B%A0%E4%B8%BA%E5%BD%93%E6%88%91%E6%9B%B4%E6%94%B9%3CBR%20%2F%3E-%20(%E5%8F%AF%E7%A9%BA%20TL_TagAPDUResponse%20*)apduExchangeWithByteArray%3A(NSData%20*_Nonnull)apduData%3B%3CBR%20%2F%3E%E5%AE%9E%E9%99%85%E4%B8%8A%EF%BC%9A%3CBR%20%2F%3E%20-%20%EF%BC%88%E5%8F%AF%E7%A9%BA%E7%9A%84IOSByteArray%20*%EF%BC%89apduExchangeWithByteArray%EF%BC%9A%EF%BC%88IOSByteArray%20*%20_Nonnull%EF%BC%89apduData%EF%BC%9B%3CBR%20%2F%3E%E5%AE%83%E5%BC%80%E5%A7%8B%E5%8F%91%E6%8C%A5%E4%BD%9C%E7%94%A8%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1991020%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9ATaplinx%20iOS%20%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E5%9B%A0%E6%A0%87%E7%AD%BE%E5%93%8D%E5%BA%94%E8%80%8C%E5%B4%A9%E6%BA%83%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1991020%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%EF%BC%8C%E8%BE%BE%E7%B1%B3%E5%AE%89%EF%BC%8C%3C%2FP%3E%0A%3CP%3E%E4%B9%9F%E8%AE%B8%E9%94%99%E8%AF%AF%E7%9A%84%E5%8E%9F%E5%9B%A0%E6%98%AF%E7%94%B1%E4%BA%8E%E8%B6%85%E5%87%BA%E4%BA%86%E5%86%85%E5%AD%98%E9%99%90%E5%88%B6%E8%80%8C%E4%B8%8D%E6%98%AF%20TapLinx%20%E5%BA%93%EF%BC%9F%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20%20language-csharp%22%3E%3CCODE%20translate%3D%22no%22%3EMobileFacilityApp%5B5223%5D%20exceeded%20mem%20limit%3A%20InactiveHard%203072%20MB%20(fatal)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%E9%9B%86%E6%88%90TapLinx%E5%BA%93%E7%9A%84%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E5%8F%AF%E4%BB%A5%E6%8C%89%E5%A6%82%E4%B8%8B%E6%96%B9%E5%BC%8F%E4%BD%BF%E7%94%A8%EF%BC%88%E6%97%A0%E9%9C%80%E5%9C%A8%E9%A1%B6%E5%B1%82%E5%AE%9E%E7%8E%B0ApduExchange%EF%BC%89%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%E5%B0%86%E5%A7%94%E6%89%98%E8%AE%BE%E7%BD%AE%E4%B8%BA%20APDUHandler%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-java%22%3E%3CCODE%20translate%3D%22no%22%3Elet%20reader%20%3D%20TL_IOSNFCReader(uid%3A%20tag.identifier%2C%20historicalBytes%3A%20tag.historicalBytes%20%3F%3F%20Data())%0A%0Ahandler%20%3D%20TapLinxApduHandler(reader%3A%20reader)%0A%0Ahandler.delegate%20%3D%20self%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%0AlibraryManager%3F.setApduHandlerWithApduHandler(handler)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3E%E4%B8%8B%E4%B8%80%E6%AD%A5%E6%98%AF%E5%9C%A8%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E5%86%85%E9%83%A8%E5%AE%9E%E7%8E%B0%E5%8D%8F%E8%AE%AE%E6%96%B9%E6%B3%95%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-java%22%3E%3CCODE%20translate%3D%22no%22%3Efunc%20apduExchange(withByteArray%20apduData%3A%20Data)%20-%26gt%3B%20TL_TagAPDUResponse%3F%20%7B%0A%0A%20%20%20%20%20%20%20%20var%20tagAPDUResponse%3A%20TL_TagAPDUResponse%3F%0A%0A%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20if%20connectedTag%20!%3D%20nil%20%7B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20Send%20Tag%20Type%20Native%20of%20ISO%20and%20the%20apdu%20as%20NFCISO7816APDU%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20executeAPDUCommandOn7816Tag(tagType%3A%20tagtype%2C%20apdu%3A%20apdu)%20%7B%20data%20in%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20let%20appendedData%20%3D%20data%0A%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20tagAPDUResponse%20%3D%20TL_TagAPDUResponse(responseData%3A%20appendedData%2C%20tag%3A%20self.currentTag)%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20semaphore.signal()%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20let%20_%20%3D%20semaphore.wait(timeout%3A%20.now()%20%2B%203.0)%0A%0A%20%20%20%20%20%20%20%20%7D%20else%20if%20connectedMifareTag%20!%3D%20nil%20%7B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20let%20semaphore%20%3D%20DispatchSemaphore(value%3A%200)%0A%0A%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20print(%22MIFARE%20CAPDU%20%3CLI-EMOJI%20id%3D%22lia_mobile-phone%22%20title%3D%22%3Amobile_phone%3A%22%3E%3C%2FLI-EMOJI%3E-%26gt%3B%3CLI-EMOJI%20id%3D%22lia_credit-card%22%20title%3D%22%3Acredit_card%3A%22%3E%3C%2FLI-EMOJI%3E%20%5C(apduData.hex)%22)%0A%0A%20%20%20%20%20%20%20%20%20%20%20%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20executeAPDUCommandOnMIFARETag(apdu%3A%20apduData)%20%7B%20data%20in%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20print(%22RAPDU%20%3CLI-EMOJI%20id%3D%22lia_mobile-phone%22%20title%3D%22%3Amobile_phone%3A%22%3E%3C%2FLI-EMOJI%3E%26lt%3B-%3CLI-EMOJI%20id%3D%22lia_credit-card%22%20title%3D%22%3Acredit_card%3A%22%3E%3C%2FLI-EMOJI%3E%20Data%3A%20%5C(data.hex)%22)%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20tagAPDUResponse%20%3D%20TL_TagAPDUResponse(responseData%3A%20data%2C%20tag%3A%20self.currentTag)%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20semaphore.signal()%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20let%20_%20%3D%20semaphore.wait(timeout%3A%20.now()%20%2B%203.0)%0A%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20print(%22Tag%20Response%20%5C(String(describing%3A%20tagAPDUResponse))%22)%0A%0A%20%20%20%20%20%20%20%20return%20tagAPDUResponse%0A%0A%20%20%20%20%7D%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%E5%B8%8C%E6%9C%9B%E8%BF%99%E7%A7%8D%E7%AE%80%E5%8C%96%E8%83%BD%E5%AF%B9%E6%82%A8%E6%9C%89%E6%89%80%E5%B8%AE%E5%8A%A9%E3%80%82%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%E9%A1%BA%E7%A5%9D%E5%95%86%E7%A5%BA%EF%BC%81%3C%2FP%3E%0A%3CP%3ETapLinx%E5%9B%A2%E9%98%9F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1990546%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9ATaplinx%20iOS%20%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E5%9B%A0%E6%A0%87%E7%AD%BE%E5%93%8D%E5%BA%94%E8%80%8C%E5%B4%A9%E6%BA%83%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1990546%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E8%BF%98%E6%9C%89%E4%B8%80%E4%BB%B6%E4%BA%8B%20-%20apduData%20%E5%AE%9E%E9%99%85%E4%B8%8A%E4%B9%9F%E6%98%AF%20IOSByteArray%EF%BC%8C%E8%80%8C%E4%B8%8D%E6%98%AF%20NSData%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1990544%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9ATaplinx%20iOS%20%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E5%9B%A0%E6%A0%87%E7%AD%BE%E5%93%8D%E5%BA%94%E8%80%8C%E5%B4%A9%E6%BA%83%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1990544%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%98%BE%E7%84%B6%20TapLinx-v2.0.0%20%E4%B8%AD%E5%8C%85%E5%90%AB%E7%9A%84%E6%A0%87%E9%A2%98%E9%83%BD%E6%98%AF%E9%94%99%E8%AF%AF%E7%9A%84%E3%80%82%E5%9C%A8TapLinxApduHandler.h%E4%B8%AD%E6%88%91%E4%BB%AC%E7%9C%8B%E5%88%B0%E5%A3%B0%E6%98%8E%EF%BC%9A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%20translate%3D%22no%22%3E-%20(nullable%20TL_TagAPDUResponse%20*)apduExchangeWithByteArray%3A(NSData%20*_Nonnull)apduData%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E4%BD%86%E5%AE%9E%E9%99%85%E4%B8%8A%E6%88%91%E4%BB%AC%E5%BA%94%E8%AF%A5%E8%BF%94%E5%9B%9E%20IOSByteArray*%EF%BC%8C%E5%90%A6%E5%88%99%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E5%B0%86%E5%B4%A9%E6%BA%83%E5%B9%B6%E5%87%BA%E7%8E%B0%E4%B8%8A%E8%BF%B0%E7%97%87%E7%8A%B6%3C%2FP%3E%3C%2FLINGO-BODY%3E