条码阅读器的 iOS 库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14513553/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 22:00:30  来源:igfitidea点击:

iOS library for Barcode reader

iosobjective-ciphoneipad

提问by ck8414

Possible Duplicate:
Is there a barcode recognition framework for iOS?

可能的重复:
是否有适用于 iOS 的条形码识别框架?

Which is the best free sdk or library for iOS barcode reader? i am currently implementing an app for my company and we want to support barcode and QR code scan, can someone please suggest me the best sdk that works on iOS4,5 ?

哪个是适用于 iOS 条码阅读器的最佳免费 sdk 或库?我目前正在为我的公司实施一个应用程序,我们希望支持条形码和二维码扫描,有人可以向我推荐适用于 iOS4,5 的最佳 sdk 吗?

回答by swiftBoy

I would suggest you, have a look on below some good API for bar code scanning

我建议你,看看下面一些用于条码扫描的好 API

Update on May-2019

2019 年 5 月更新

Here is the code snip if you use ZBar API

如果您使用 ZBar API,这里是代码片段

ZBarReaderController *reader = [ZBarReaderController new];
reader.readerDelegate = self;

    //... code to get image

CGImageRef imgCG = image.CGImage;


id<NSFastEnumeration> results = [reader scanImage:imgCG];
ZBarSymbol *symbol = nil;

for(symbol in results)
    // EXAMPLE: just grab the first barcode
    break;
resultText.text = symbol.data;

Also Make sure PL don't forget to use weak link for AVFoundation, CoreVideo and CoreMedia framework

还要确保 PL 不要忘记为 AVFoundation、CoreVideo 和 CoreMedia 框架使用弱链接

回答by odukku

The ZBAR iPhone sdk is very much effective for reading bar codes and qrcodes. You can find the sdk files and how to use the sdk tutorials in here

ZBAR iPhone sdk 对于读取条码和二维码非常有效。您可以在此处找到 sdk 文件以及如何使用 sdk 教程