zbar sdk not working on iphone simulator by using camera simulator

半世苍凉 提交于 2019-12-01 09:25:57

问题


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?


回答1:


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.




回答2:


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.




回答3:


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.




回答4:


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.



来源:https://stackoverflow.com/questions/13583800/zbar-sdk-not-working-on-iphone-simulator-by-using-camera-simulator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!