Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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.

I found a ".a" and ".h" file that look like they have all the delegations etc but i have no clue how to action some of the functions.

If you need more information please ask.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
555 views
Welcome To Ask or Share your Answers For Others

1 Answer

To provides access to Linea device series.

In order to use Linea in your program, several steps have to be performed. These steps are from 2011, and may have changed in 2017, but are shown here for historical purposes:

- Include LineaSDK.h and libdtdev.a in your project.
- Go to Frameworks and add ExternalAccessory framework
- Edit your program plist file, add new element and select 
  "Supported external accessory protocols" from the list, then add two items to it -
  ‘com.datecs.linea.pro.msr’ and ‘com.datecs.linea.pro.bar’
- Write code in MainViewController.m file to connect and retrieve barcode data.

1) Include “LineaSDK.h” and “libdtdev.a” in your project under Classes folder.

2017 update: Download latest DTDEVICES SDK from developer.ipcmobile.com . As of January 2017, latest version is v2.01, supporting devices up to the Linea Pro 7.

2) “Add existing frameworks” in your project.

  1. In the project navigator, select your project
  2. Select your target.
  3. Select the 'Build Phases' tab
  4. Open 'Link Binaries With Libraries' expander
  5. Click the '+' button
  6. Select 'External Accessory framework'
  7. Drag and drop the added framework to the 'Frameworks' group

3) Edit your project .plist file

<key>Supported external accessory protocols</key>
<value>
<array>
<string>com.datecs.linea.pro.msr</string>
<string>com.datecs.linea.pro.bar</string>
</array>
</value>

4) Write code in MainViewController.m file

// Important to init linea class and connect it

- (void)viewDidLoad
{
    // init linea class and connect it    
    linea =[Linea sharedDevice];
    [linea addDelegate:self];
    [linea connect];    

    [super viewDidLoad];
}

// It calls after successfuly reads barode data

-(void)barcodeData:(NSString *)barcode type:(int)type {    

     // You can use this data as you wish
     // Here I write barcode data into the console
     NSLog(@"Barcode Data: %@”, barcode);
}

Note: Import ‘LineaSDK.h’ into your MainViewController.h and declare

Linea* linea;

variable.

It works very well.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...