条码阅读器的 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
iOS library for Barcode reader
提问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 月更新
- ZXing(Now only available for Android)
- ZBar bar code reader
- shopsavvy
- Softek Barcode Reader SDK
- Scandit Barcode Scanner(not free)
- ZXing(现在仅适用于Android)
- ZBar 条码阅读器
- 购物狂
- Softek条码阅读器SDK
- Scandit 条码扫描器(非免费)
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 框架使用弱链接