<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Taplinx iOS appcrash on tag response in TapLinx SDK, TagWriter and TagInfo</title>
    <link>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Taplinx-iOS-appcrash-on-tag-response/m-p/1991088#M64</link>
    <description>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;</description>
    <pubDate>Fri, 08 Nov 2024 11:42:39 GMT</pubDate>
    <dc:creator>DamianD</dc:creator>
    <dc:date>2024-11-08T11:42:39Z</dc:date>
    <item>
      <title>Taplinx iOS appcrash on tag response</title>
      <link>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Taplinx-iOS-appcrash-on-tag-response/m-p/1989340#M50</link>
      <description>&lt;P&gt;Hi, i followed &lt;SPAN&gt;UG10045.pdf and created ios application. I created&amp;nbsp;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:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;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 -&amp;gt; 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&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i sent back empty response back to taplinx library (just&amp;nbsp;TL_TagAPDUResponse without setting ResponseData) - app does not crash and i get error about incomplete response (which is expected). What am i doing wrong?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2024 20:09:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Taplinx-iOS-appcrash-on-tag-response/m-p/1989340#M50</guid>
      <dc:creator>DamianD</dc:creator>
      <dc:date>2024-11-06T20:09:51Z</dc:date>
    </item>
    <item>
      <title>Re: Taplinx iOS appcrash on tag response</title>
      <link>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Taplinx-iOS-appcrash-on-tag-response/m-p/1990544#M51</link>
      <description>&lt;P&gt;apparently included headers in&amp;nbsp;TapLinx-v2.0.0 are all wrong. In&amp;nbsp;TapLinxApduHandler.h we see declaration:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;- (nullable TL_TagAPDUResponse *)apduExchangeWithByteArray:(NSData *_Nonnull)apduData;&lt;/LI-CODE&gt;&lt;P&gt;but in reality we should return IOSByteArray*, otherwise app will crash with aforementioned symptoms&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 22:04:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Taplinx-iOS-appcrash-on-tag-response/m-p/1990544#M51</guid>
      <dc:creator>DamianD</dc:creator>
      <dc:date>2024-11-07T22:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: Taplinx iOS appcrash on tag response</title>
      <link>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Taplinx-iOS-appcrash-on-tag-response/m-p/1990546#M52</link>
      <description>&lt;P&gt;one more thing - apduData is really also IOSByteArray, not NSData&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2024 22:05:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Taplinx-iOS-appcrash-on-tag-response/m-p/1990546#M52</guid>
      <dc:creator>DamianD</dc:creator>
      <dc:date>2024-11-07T22:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Taplinx iOS appcrash on tag response</title>
      <link>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Taplinx-iOS-appcrash-on-tag-response/m-p/1991020#M57</link>
      <description>&lt;P&gt;Hello Damian,&lt;/P&gt;
&lt;P&gt;Maybe the cause of the error is some exceeding memory limit and not TapLinx library?&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-csharp"&gt;&lt;CODE&gt;MobileFacilityApp[5223] exceeded mem limit: InactiveHard 3072 MB (fatal)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The application which integrates TapLinx Library can be used as following (no need for ApduExchange implementation on top)&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Set the delegate to the APDUHandler&lt;/STRONG&gt;&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;let reader = TL_IOSNFCReader(uid: tag.identifier, historicalBytes: tag.historicalBytes ?? Data())

handler = TapLinxApduHandler(reader: reader)

handler.delegate = self

                

libraryManager?.setApduHandlerWithApduHandler(handler)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Next Step will be to implement the protocol method inside the application&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;func apduExchange(withByteArray apduData: Data) -&amp;gt; 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 &lt;LI-EMOJI id="lia_mobile-phone" title=":mobile_phone:"&gt;&lt;/LI-EMOJI&gt;-&amp;gt;&lt;LI-EMOJI id="lia_credit-card" title=":credit_card:"&gt;&lt;/LI-EMOJI&gt; \(apduData.hex)")

           

            executeAPDUCommandOnMIFARETag(apdu: apduData) { data in

                print("RAPDU &lt;LI-EMOJI id="lia_mobile-phone" title=":mobile_phone:"&gt;&lt;/LI-EMOJI&gt;&amp;lt;-&lt;LI-EMOJI id="lia_credit-card" title=":credit_card:"&gt;&lt;/LI-EMOJI&gt; 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

    }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this simplification would help you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;TapLinx team&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 10:12:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Taplinx-iOS-appcrash-on-tag-response/m-p/1991020#M57</guid>
      <dc:creator>ukcas</dc:creator>
      <dc:date>2024-11-08T10:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Taplinx iOS appcrash on tag response</title>
      <link>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Taplinx-iOS-appcrash-on-tag-response/m-p/1991041#M60</link>
      <description>hi&lt;BR /&gt;the crash definietly comes from taplinx library because when i changed&lt;BR /&gt;- (nullable TL_TagAPDUResponse *)apduExchangeWithByteArray:(NSData *_Nonnull)apduData;&lt;BR /&gt;to actually:&lt;BR /&gt;- (nullable IOSByteArray*)apduExchangeWithByteArray:(IOSByteArray*_Nonnull)apduData;&lt;BR /&gt;It started working&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 08 Nov 2024 10:30:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Taplinx-iOS-appcrash-on-tag-response/m-p/1991041#M60</guid>
      <dc:creator>DamianD</dc:creator>
      <dc:date>2024-11-08T10:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: Taplinx iOS appcrash on tag response</title>
      <link>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Taplinx-iOS-appcrash-on-tag-response/m-p/1991063#M61</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/169705"&gt;@ukcas&lt;/a&gt;&amp;nbsp;- what version of taplinx ios library is 'current'? Because i have 2.0.0 and it &lt;SPAN&gt;definitely crashes when i return&amp;nbsp;TL_TagAPDUResponse from&amp;nbsp;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.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2024 11:00:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Taplinx-iOS-appcrash-on-tag-response/m-p/1991063#M61</guid>
      <dc:creator>DamianD</dc:creator>
      <dc:date>2024-11-08T11:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Taplinx iOS appcrash on tag response</title>
      <link>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Taplinx-iOS-appcrash-on-tag-response/m-p/1991088#M64</link>
      <description>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;</description>
      <pubDate>Fri, 08 Nov 2024 11:42:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Taplinx-iOS-appcrash-on-tag-response/m-p/1991088#M64</guid>
      <dc:creator>DamianD</dc:creator>
      <dc:date>2024-11-08T11:42:39Z</dc:date>
    </item>
  </channel>
</rss>

