ioscardreader

After Setting up iDynamo app, I am unable to connect to device


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.


Solution

  • 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.