Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linea Pro Barcode Scanner iPhone Issues

I downloaded the iOS SDK for the Linea Pro device from their website and have successfully implemented some of it in my App - but I noticed the device never seems to work while its connected to the Mac via the USB cable. I've verified this 100% because as soon as I disconnect the LineaPro sled from the USB cable and run their Apps, it finds the Scanner and works. Otherwise, nothing.

This of course makes debugging near impossible because if you're not connected to Xcode you obviously can't see any output the App may have in Xcode's Console. You can't NSLog anything to the console, you can't put Breakpoints, you can't step-through your code - you pretty much can't do any of the things you'd normally do when developing an App.

I've actually had to resort to creating UITextViews and outputting everything I can to them during runtime ( which of course clutters up the interface big time) but even with that, if the App crashes, you never get to see your TextViews: you're thrown out and back to the iOS home screen, staring at all your little icons.

I've got some other ideas regarding work-arounds - but that's just it: they're all work-arounds. Does anyone out there know if there's any way to use the Linea Pro while its still connected to Xcode?

like image 546
sirab333 Avatar asked Mar 22 '14 23:03

sirab333


2 Answers

I don't think this is possible. For some reason lightning devices and USB don't seem to work together well.

I would suggest a combination of https://github.com/fpillet/NSLogger for logging and https://github.com/Shopify/superdb for sending messages to your app. You won't get breakpoints but you will have a few more tools at your disposal.

like image 179
Patrick Tescher Avatar answered Oct 02 '22 21:10

Patrick Tescher


If you are using a device running iOS11 and you are using XCode 9, you no longer need to connect via lightning cable to debug your runtime build. XCode 9 introduced wireless debugging via a network connection:

Wireless Device Pairing Apple Documentation

like image 40
shirefriendship Avatar answered Oct 02 '22 21:10

shirefriendship