Does anyone know of or have a manual on how to script in xcode with the linea-pro.
I have hunted the web and asked Infinite Peripherals for help but no reply.
<
Import the .a and .h file
Add ExternalAccessory.framework
open your info.plist file as source code and add the following lines:
UIBackgroundModes
external-accessory
UISupportedExternalAccessoryProtocols
com.datecs.linea.pro.msr
com.datecs.linea.pro.bar
com.datecs.printer.escpos
com.datecs.iserial.communication
com.datecs.pinpad
Add to your interface like this:
@interface ViewController : UIViewController
In your .h file of your ViewController add the DTDevices object
@interface ViewController : UIViewController
{
DTDevices *scanner;
}
In the ViewDidLoad function, add the connection code:
scanner=[DTDevices sharedDevice];
[scanner addDelegate:self];
[scanner connect];
Get connection status by adding this method to your code:
-(void)connectionState:(int)state {
switch (state) {
case CONN_DISCONNECTED:
//Disconnected
break;
case CONN_CONNECTING:
//Connecting
break;
case CONN_CONNECTED:
//Connected
break;
}
}
Hope this helps.