Git Product home page Git Product logo

Comments (4)

pmlemay avatar pmlemay commented on June 16, 2024 1

@jbouche-work
Hello, I was also experiencing issues with .net8 QR code scanning crashing saying to use the specific implementation for each platform when trying to use the .Scan method. For some reasons we do not have access to use this public method in the MobileBarcodeScanner.ios.cs : Scan(bool useAVCaptureEngine) which can solve the problem. For now my solution is copying all the code in my own project and using this scan method is now possible and works. I had to change some deprecated code like the AVCaptureDevice, here's an exemple of that:

AVCaptureDeviceType[] deviceTypes = new AVCaptureDeviceType[] {
    AVCaptureDeviceType.BuiltInTrueDepthCamera,
    AVCaptureDeviceType.BuiltInDualCamera,
    AVCaptureDeviceType.BuiltInWideAngleCamera
};
AVCaptureDeviceDiscoverySession discoverySession = AVCaptureDeviceDiscoverySession.Create(deviceTypes,        
    AVMediaType.Video, AVCaptureDevicePosition.Back);
AVCaptureDevice[] devices = discoverySession.Devices;
AVCaptureDevice device = devices.FirstOrDefault();

from zxing.net.mobile.

pmlemay avatar pmlemay commented on June 16, 2024 1

Hi @AtinAgarwal1981,

You cannot use the nuget at this moment since it is not up to date for .net8, what we did is to download the source code from here, include it in your project and fix the compilation bugs (I posted one of the exemple bugs fixes). You can then use the right methods (or even change the code so that it always takes the "useAVCaptureEngine" parameter by default so that it always works for .net8 iOS

from zxing.net.mobile.

jbouche-work avatar jbouche-work commented on June 16, 2024

@jbouche-work Hello, I was also experiencing issues with .net8 QR code scanning crashing saying to use the specific implementation for each platform when trying to use the .Scan method. For some reasons we do not have access to use this public method in the MobileBarcodeScanner.ios.cs : Scan(bool useAVCaptureEngine) which can solve the problem. For now my solution is copying all the code in my own project and using this scan method is now possible and works. I had to change some deprecated code like the AVCaptureDevice, here's an exemple of that:

AVCaptureDeviceType[] deviceTypes = new AVCaptureDeviceType[] {
    AVCaptureDeviceType.BuiltInTrueDepthCamera,
    AVCaptureDeviceType.BuiltInDualCamera,
    AVCaptureDeviceType.BuiltInWideAngleCamera
};
AVCaptureDeviceDiscoverySession discoverySession = AVCaptureDeviceDiscoverySession.Create(deviceTypes,        
    AVMediaType.Video, AVCaptureDevicePosition.Back);
AVCaptureDevice[] devices = discoverySession.Devices;
AVCaptureDevice device = devices.FirstOrDefault();

Hi,

Thanks a lot for your response, I just tested it and it works perfectly.
Looks like all that's left to do is make a PR ;) (But there is a lot of deprecated stuff...).

Thank you very much for your response ^^.

PS : I hope that in the next month we will have a new ZXing nuget .Net8.0-ios and android ready ^^.

from zxing.net.mobile.

AtinAgarwal1981 avatar AtinAgarwal1981 commented on June 16, 2024

Hi,

I am still not sure how to use ZXing with .NET iOS application. i am not getting bool useAVCaptureEngine option on .net 8. Could u please send me sample project where i can see how to use the ZXing.Mobile nuget with .NET8 iOS application please.

kind regards,
Atin..

from zxing.net.mobile.

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.