CIDetctor始终保持为零,无法读取QRCode [英] CIDetctor always remains nil, Cant read QRCode

查看:107
本文介绍了CIDetctor始终保持为零,无法读取QRCode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法初始化CIDetector来读取QRCOde,它始终保持为零。这是我的代码:

I cannot initialize CIDetector for reading QRCOde , It always remains nil. Here is my code :

let options = [CIDetectorAccuracy: CIDetectorAccuracyHigh]
            self.detector =  CIDetector(ofType: CIDetectorTypeQRCode, context: nil, options: options)

如果我替换 CIDetectorTypeQRCode CIDetectorTypeRectangle 进行了初始化,但是我需要阅读QRCode

If I replace CIDetectorTypeQRCode with CIDetectorTypeRectangle it get initialized but I need to read QRCode

我正在尝试从最后两个开始天,请提供帮助

I am trying from last two days, Please help

推荐答案

最终使该工作正常了:

关注步骤:


  1. 选择XcodeProject

  2. 选择目标

  3. 选择构建设置

  4. 确保ValidArchitecture具有arm64或将其替换为(arm64 armv7 armv7s)

  1. Select XcodeProject
  2. Select Target
  3. Select BuildSettings
  4. Make Sure ValidArchitecture have arm64 or replace it with (arm64 armv7 armv7s)

这篇关于CIDetctor始终保持为零,无法读取QRCode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆