GithubHelp home page GithubHelp logo

Interface[7980:4477032] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[AVCaptureMetadataOutput setMetadataObjectTypes:] - unsupported type found. Use -availableMetadataObjectTypes.' about qrcodereader.swift HOT 6 CLOSED

yannickl avatar yannickl commented on August 22, 2024
Interface[7980:4477032] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[AVCaptureMetadataOutput setMetadataObjectTypes:] - unsupported type found. Use -availableMetadataObjectTypes.'

from qrcodereader.swift.

Comments (6)

yannickl avatar yannickl commented on August 22, 2024

Hi,

That's strange, normally it should works. Have you tried to check whether the device supports the AVMetadataObjectTypeQRCode?

Use the QRCodeReader.supportsMetadataObjectTypes() method to check that.

from qrcodereader.swift.

yannickl avatar yannickl commented on August 22, 2024

Have you some news?

from qrcodereader.swift.

carlosdelfino avatar carlosdelfino commented on August 22, 2024

Hi Yannick,

I'm in another project at the time, next week will make the suggested test.
Thank you.

Carlos Delfino
Consultor
WhatsApp: (31) 8731-9450
Celular: (85) 985-205-490 (OI) - Fortaleza/CE
Conheça o Curso Arduino Minas: http://www.carlosdelfino.eti.br/cursoarduino
Tecnologia no Social: http://www.facebook.com.br/TecnologiaNoSocial
Sobre mim: http://about.me/CarlosDelfino

“Para o Triunfo do Mal, só é preciso que os homens de bem não façam nada” -
Edmund Burke

“Ninguém comete erro maior do que não fazer nada porque só pode fazer um
pouco” - Edmund Burke

2015-10-21 7:43 GMT-03:00 Yannick Loriot [email protected]:

Have you some news?


Reply to this email directly or view it on GitHub
#26 (comment)
.

from qrcodereader.swift.

 avatar commented on August 22, 2024

I also am experiencing same crash in production sometimes. Please investigate the issue.

QRCodeReader: function signature specialization <Arg[0] = Owned To Guaranteed, Arg[1] = Dead> of static QRCodeReader.QRCodeReader.supportsMetadataObjectTypes (QRCodeReader.QRCodeReader.Type)([Swift.String]?) -> Swift.Bool + 2408

from qrcodereader.swift.

southpawjoe avatar southpawjoe commented on August 22, 2024

I bet you're seeing this when the user has refused to allow the app to use the camera

from qrcodereader.swift.

southpawjoe avatar southpawjoe commented on August 22, 2024

Yep, that's what it is. Try this in your code to see. If the user previously rejected use of the camera, you need to ask them again or disable the camera feature in your app:

if AVCaptureDevice.authorizationStatusForMediaType(AVMediaTypeVideo) != AVAuthorizationStatus.Authorized {
            AVCaptureDevice.requestAccessForMediaType(AVMediaTypeVideo, completionHandler: { (granted :Bool) -> Void in
                if granted == true
                {
                    // User granted
                    self.barcodereader = QRCodeReaderViewController(metadataObjectTypes: [AVMetadataObjectTypeQRCode])
                }
                else
                {
                    // User Rejected
                }
            });
        }

from qrcodereader.swift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.