swift – 启动GMVDetector失败

swift – 启动GMVDetector失败,第1张

概述我使用以下代码在我的 Swift 3.1项目中使用GoogleMobileVision / Barcode检测器: GMVDetector(ofType: GMVDetectorTypeBarcode, options: nil) 但在日志中显示: 似乎iOS中的GoogleMobileVision是封闭源代码,所以我无法真正看到实现方面发生了什么 关于这里可能发生什么的任何想法? 我认为你需要设 我使用以下代码在我的 Swift 3.1项目中使用GoogleMobileVision / barcode检测器:

GMVDetector(ofType: GMVDetectorTypebarcode,options: nil)

但在日志中显示:

似乎iOS中的GoogleMobileVision是封闭源代码,所以我无法真正看到实现方面发生了什么

关于这里可能发生什么的任何想法?

解决方法 我认为你需要设置一些可选的条形码类型值,如EAN13或QRcode而不是nil.

var detector = GMVDetector()let options:[AnyHashable: Any] = [GMVDetectorbarcodeFormats : GMVDetectorbarcodeFormat.EAN13.rawValue]self.detector = GMVDetector.init(ofType: GMVDetectorTypebarcode,options: options)
总结

以上是内存溢出为你收集整理的swift – 启动GMVDetector失败全部内容,希望文章能够帮你解决swift – 启动GMVDetector失败所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1015859.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-22
下一篇 2022-05-22

发表评论

登录后才能评论

评论列表(0条)

保存