2

I have to support barcode scanning on my project. I'm using zbar sdk for that.I have integrated the code and run using iphone simulator. I'm using camera simulator for scanning barcode.Its opening the barcode image correctly.but barcode scanning not working. Anyone used this?

Harikrishnan
  • 9,688
  • 11
  • 84
  • 127

4 Answers4

8

you can test bar code on iPhone Simulator,

1 - save the bar code to you simulator, open safari and drag drop the barcode image into safari and then long tap the image, I'll ask you to save the image.

2 - run simulator and when on barcode scan screen press "optons+threefingres long tap" it'll open the gallery where you can select the saved barcode image, then It'll scan that image.

aahsanali
  • 3,537
  • 23
  • 21
  • I'm using that method. It is opening the image correctly. but didn't scan properly. – Harikrishnan Nov 27 '12 at 12:10
  • 1
    sometimes it zooms the image, zoom out the image and then again open the bar code image. – aahsanali Nov 27 '12 at 12:12
  • thats right. I have just tried it. Now the picked barcode is showing in correct size. but nothing happening.just stuck on that window. http://i49.tinypic.com/28utde8.png – Harikrishnan Nov 27 '12 at 12:26
  • I believe yes.I'm attaching my code. Its only few lines. Please correct me if I'm wrong. http://www.ziddu.com/download/20986948/BarcodeScannerViewCtrl.rtf.html – Harikrishnan Nov 27 '12 at 12:50
  • @ÐąrέÐέvil: Yes .. it zooms the image after zooming out..it works. – Shailesh Jan 29 '13 at 09:44
  • When I do this it just straight up crashes the the app. I'm not exactly sure why. Something to do with an invalid selector assignment. – Alioo Oct 16 '13 at 14:20
1

Unless you are testing code paths for when a camera is unavailable, you will need an actual device to test code that uses the zbar sdk.

Andy Obusek
  • 12,614
  • 4
  • 41
  • 62
  • I dont have developer licensee now. I'm waiting for it.So I'm just trying to test it in simulator. – Harikrishnan Nov 27 '12 at 12:30
  • Fixed It. It was the problem of barcode images. tried few small barcode images and one worked.So try multiple small barcodes,and at last one will work..thanks – Harikrishnan Nov 28 '12 at 10:14
0

Fixed It. It was the problem of barcode images. I tried few small barcode images and one worked.So try multiple small barcodes,and at last one will work. More Important the orientation of image should be like this. enter image description here

Harikrishnan
  • 9,688
  • 11
  • 84
  • 127
0

Just as additional information :

I drop the image on the simulator and use the two-fingers long tap to open them (as has been pointed out already) , but in my experience it seems that you need to have enough space around the images before zbar can identify them.

So add enough white space around the image and it will probably start to work.

Nenad
  • 181
  • 2
  • 6