2

So, I have uploaded my project file here: http://devswap.org/downloads/readerTest.zip

I did a copy/paste exercise from the iOS sample application provided by MagTek, and I now have virtually identical code. (AppDelegate, ViewController, etc...) My card reader will connect to the device with the sample app but not my custom app.

What I have tried: I have assigned the correct sdk protocol identifier, com.magtek.idynamo, as specified in the Technical Documentation: http://www.magtek.com/docs/99875473.pdf (page 14).

I know that it authenticates with my iPad mini (iOS 7.1) because the sample app functions, and the EAAccessory class registers that it is connected when my app launches. However, I am unable to connect to it using MagTek's MTSCRA class.

At this point I am sure that it has something to do with the way the project is set up, as the code is virtually identical. The only difference is that I have used a storyboard, while the sample app uses a single .xib file.

If anybody can take a look at the project file hosted on my website above and see what I'm doing wrong, any help is appreciated.

Infinite Recursion
  • 6,511
  • 28
  • 39
  • 51
AverageGuy
  • 97
  • 1
  • 10

1 Answers1

8

Your code looks fine, however you seem to be missing the correct External Accessory key in your Info.plist, as outlined by this entry in the debugger window.

2014-06-17 01:27:50.111 readerTest[3075:60b] ERROR - opening session failed as protocol com.magtek.idynamo is not declared in Info.plist

You have the key as a String and it should be an Array.

Right click on your plist, select open as source code.

Delete the existing entry for com.magtek.idynamo.

Paste this code into the plist:

<key>UISupportedExternalAccessoryProtocols</key>
<array>
    <string>com.magtek.idynamo</string>
</array>

This will fix your issue and the software will run like it should.

Zerstorer
  • 96
  • 1
  • 3
  • Thanks for the response! I'd given up on getting an answer for this. I'll let you know if it works. – AverageGuy Jun 18 '14 at 22:26
  • 4
    I have exactly the same problem, it's working with their app, but not with my custom app. Did you find a solution? Note: I already added com.magtek.idynamo in Info.plist, and still not working. – Beny Boariu Sep 01 '14 at 10:41