Session preset support check fixed

This commit is contained in:
Vladimir Makarov 2021-12-15 20:46:51 +05:00
parent 8a60b59c62
commit b1f649ec68
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'QRCodeReader'
s.version = '1.0.6'
s.version = '1.0.7'
s.summary = 'iOS framework contain core view elements and logic component for work with QR codes.'
s.homepage = 'https://github.com/TouchInstinct/QRCodeReader-ios'

View File

@ -143,7 +143,7 @@ open class QRCodeReader: NSObject, AVCaptureMetadataOutputObjectsDelegate {
// MARK: - Private Methods
private func configureDefaultComponents() {
if session.canSetSessionPreset(.hd4K3840x2160) {
if defaultDevice?.supportsSessionPreset(.hd4K3840x2160) {
session.sessionPreset = .hd4K3840x2160
} else {
session.sessionPreset = .photo