barcode_scan2
barcode_scan2 copied to clipboard
[Bug] SwiftBarcodeScanPlugin.swift deprecated code
BUG REPORTS WITHOUT PROVIDING THESE INFORMATIONS WILL BE CLOSED DIRECTLY. DON'T REMOVE THE SECTIONS!
Describe the bug A build warning that .devices(for:) is deprecated
'devices(for:)' was deprecated in iOS 10.0: Use AVCaptureDeviceDiscoverySession instead.
File: SwiftBarcodeScanPlugin.swift
Function: public func handle
Line: 23
result(AVCaptureDevice.devices(for: .video).count)
To Reproduce Steps to reproduce the behavior:
- Open in Xcode
- Build
Expected behavior Expected no error
Screenshots
Logs
Environment (please complete the following information):
- Version of
barcode_scan4.1.4 - Output of
flutter --version:
Flutter 2.2.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f4abaa0735 (9 weeks ago) • 2021-07-01 12:46:11 -0700
Engine • revision 241c87ad80
Tools • Dart 2.13.4
Additional context Only warnings at this stage
+1 for this
i have this message too:
[21:42:14]: ▸ 'flashMode' was deprecated in iOS 10.0: Use AVCapturePhotoSettings.flashMode instead.
[21:42:14]: ▸ return device != nil && (device?.flashMode == AVCaptureDevice.FlashMode.on || device?.torchMode == .on)
[21:42:14]: ▸ ^
[21:42:14]: ▸ 'flashMode' was deprecated in iOS 10.0: Use AVCapturePhotoSettings.flashMode instead.
[21:42:14]: ▸ device.flashMode = on ? .on : .off
[21:42:14]: ▸ ^