Closed kiliankoe closed 5 years ago
Hi @kiliankoe ,
after installing the latest Xcode update I discover the same problem. But interestingly only in debug mode: this means when I export the app "Ad Hoc" (as .ipa) and install it via Apple Configurator, the app works without crashing. Strange.
The reason seams to be that tag.identifier
returns a 7 byte long data value, but you need 8 bytes for a successful conversion to Integer. So my solution is to insert a zero byte into idData
. This solution works, it prints out the correct card ID.
if(idData.count == 7) {
idData.append(UInt8(0))
}
Thanks for reporting! Greetings from Dresden to Dresden :)
Huh, interesting bug. But thanks for the workaround! 😊
Hi!
First of all, huge thanks for this application! I've been interested in decoding Emeal data on iOS for quite a while now and am super happy to see that CoreNFC finally allows doing so.
Everything works great when using the app from the App Store, but when running it built from the code available here, I'm getting an out-of-bounds exception on trying to decode the card ID in the following snippet in MainViewController.
Any idea what's happening here?
Thanks!