<?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 Taplinx iOS crashes in apduExchange for command &amp;quot;Get Version&amp;quot; (0x60) when no data is returned in TapLinx SDK, TagWriter and TagInfo</title>
    <link>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Taplinx-iOS-crashes-in-apduExchange-for-command-quot-Get-Version/m-p/2076872#M138</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I see crashes of the SDK when using getVersionForDetectingDesFireCardType() when e.g. Tag is removed too quickly and the data is not fully received. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is what my code looks like (strip down to essential parts func &lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;apduExchange(withByteArray apduData: Data) -&amp;gt; TL_TagAPDUResponse? {
var tagAPDUResponse: TL_TagAPDUResponse? Task { 
  do {
    let data = try await self.currentTag!.sendMiFareCommand(commandPacket: apduData)
    tagAPDUResponse = TL_TagAPDUResponse(responseData: data, tag: self.tagInfo) 
  } catch { 
  } 
} 
  return tagAPDUResponse // FIXME: if we have no data we return nil which causes an exception 
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When sendMiFareCommand returns / throws an error for the getVersionCommand (0x60) then I can not return any data from the apduExchange. This is something the SDK code for getVersionForDetectingDesFireCardType can not deal with. Here is the log when this happens:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Command sent to card : 60 -[NFCTagReaderSession transceive:tagUpdate:error:]:897 Error Domain=NFCError Code=102 "Tag response error / no response" UserInfo={NSLocalizedDescription=Tag response error / no response, NSUnderlyingError=0x3031448a0 {Error Domain=nfcd Code=29 "Tag Error" UserInfo={NSLocalizedDescription=Tag Error, NSUnderlyingError=0x303144960 {Error Domain=com.apple.nfstack Code=20 "No response from tag" UserInfo={NSLocalizedDescription=No response from tag}}}}} Response received : null *** Terminating app due to uncaught exception 'Ryktinz', reason: 'com.nxp.nfclib.exceptions.InvalidResponseLengthException: Incomplete response' *** First throw call stack: (0x192d5a5fc 0x1902d5244 0x102cac90c 0x102de2d80 0x102a82688 0x10264b3bc 0x102648528 0x10264e8b5 0x102637991 0x102637aed 0x19e687e39) libc++abi: terminating due to uncaught exception of type Ryktinz The app will terminate. &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There is an easy way to reproduce this. If you change my code above to this then you will see the crash right away when you issue getVersionForDetectingDesFireCardType &lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;apduExchange(withByteArray apduData: Data) -&amp;gt; TL_TagAPDUResponse? {
var tagAPDUResponse: TL_TagAPDUResponse? Task { 
  do {
    let data = try await self.currentTag!.sendMiFareCommand(commandPacket: apduData)
    // tagAPDUResponse = TL_TagAPDUResponse(responseData: data, tag: self.tagInfo) 
  } catch { 
  } 
} 
  return tagAPDUResponse // FIXME: if we have no data we return nil which causes an exception 
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;I also noticed even when data returned but the data is not the right content / size it will crash. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is a real issue for my app right now. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you please fix this ASAP and release a new version of the SDK. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Let me know if you have any questions as I said this is very easy to reproduce. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks, Martin&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Apr 2025 08:32:52 GMT</pubDate>
    <dc:creator>Octopussy</dc:creator>
    <dc:date>2025-04-09T08:32:52Z</dc:date>
    <item>
      <title>Taplinx iOS crashes in apduExchange for command "Get Version" (0x60) when no data is returned</title>
      <link>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Taplinx-iOS-crashes-in-apduExchange-for-command-quot-Get-Version/m-p/2076872#M138</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I see crashes of the SDK when using getVersionForDetectingDesFireCardType() when e.g. Tag is removed too quickly and the data is not fully received. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Here is what my code looks like (strip down to essential parts func &lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;apduExchange(withByteArray apduData: Data) -&amp;gt; TL_TagAPDUResponse? {
var tagAPDUResponse: TL_TagAPDUResponse? Task { 
  do {
    let data = try await self.currentTag!.sendMiFareCommand(commandPacket: apduData)
    tagAPDUResponse = TL_TagAPDUResponse(responseData: data, tag: self.tagInfo) 
  } catch { 
  } 
} 
  return tagAPDUResponse // FIXME: if we have no data we return nil which causes an exception 
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When sendMiFareCommand returns / throws an error for the getVersionCommand (0x60) then I can not return any data from the apduExchange. This is something the SDK code for getVersionForDetectingDesFireCardType can not deal with. Here is the log when this happens:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Command sent to card : 60 -[NFCTagReaderSession transceive:tagUpdate:error:]:897 Error Domain=NFCError Code=102 "Tag response error / no response" UserInfo={NSLocalizedDescription=Tag response error / no response, NSUnderlyingError=0x3031448a0 {Error Domain=nfcd Code=29 "Tag Error" UserInfo={NSLocalizedDescription=Tag Error, NSUnderlyingError=0x303144960 {Error Domain=com.apple.nfstack Code=20 "No response from tag" UserInfo={NSLocalizedDescription=No response from tag}}}}} Response received : null *** Terminating app due to uncaught exception 'Ryktinz', reason: 'com.nxp.nfclib.exceptions.InvalidResponseLengthException: Incomplete response' *** First throw call stack: (0x192d5a5fc 0x1902d5244 0x102cac90c 0x102de2d80 0x102a82688 0x10264b3bc 0x102648528 0x10264e8b5 0x102637991 0x102637aed 0x19e687e39) libc++abi: terminating due to uncaught exception of type Ryktinz The app will terminate. &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There is an easy way to reproduce this. If you change my code above to this then you will see the crash right away when you issue getVersionForDetectingDesFireCardType &lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;apduExchange(withByteArray apduData: Data) -&amp;gt; TL_TagAPDUResponse? {
var tagAPDUResponse: TL_TagAPDUResponse? Task { 
  do {
    let data = try await self.currentTag!.sendMiFareCommand(commandPacket: apduData)
    // tagAPDUResponse = TL_TagAPDUResponse(responseData: data, tag: self.tagInfo) 
  } catch { 
  } 
} 
  return tagAPDUResponse // FIXME: if we have no data we return nil which causes an exception 
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;I also noticed even when data returned but the data is not the right content / size it will crash. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This is a real issue for my app right now. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you please fix this ASAP and release a new version of the SDK. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Let me know if you have any questions as I said this is very easy to reproduce. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks, Martin&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Apr 2025 08:32:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/TapLinx-SDK-TagWriter-and/Taplinx-iOS-crashes-in-apduExchange-for-command-quot-Get-Version/m-p/2076872#M138</guid>
      <dc:creator>Octopussy</dc:creator>
      <dc:date>2025-04-09T08:32:52Z</dc:date>
    </item>
  </channel>
</rss>

