diff --git a/CHANGELOG.md b/CHANGELOG.md index 128e29fd0..5685aaead 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## 6.0.2 + +Bugs fixed: +* Fixed a bug that prevented `analyzeImage` from actually accepting the configured formats. + +Improvements: +* [iOS] Excluded the `arm64` architecture for Simulators, which is unsupported by MLKit 7.0.0. + ## 6.0.1 Bugs fixed: diff --git a/README.md b/README.md index 5e724be17..efb795f7f 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,10 @@ dev.steenbakker.mobile_scanner.useUnbundled=true ``` ### iOS + +_iOS arm64 Simulators are currently not yet supported, until the migration to the Vision API is complete._ +_See_ https://github.com/juliansteenbakker/mobile_scanner/issues/1225 + **Add the following keys to your Info.plist file, located in /ios/Runner/Info.plist:** NSCameraUsageDescription - describe why your app needs access to the camera. This is called Privacy - Camera Usage Description in the visual editor. diff --git a/ios/mobile_scanner.podspec b/ios/mobile_scanner.podspec index 832f6c652..e5da058a8 100644 --- a/ios/mobile_scanner.podspec +++ b/ios/mobile_scanner.podspec @@ -4,7 +4,7 @@ # Pod::Spec.new do |s| s.name = 'mobile_scanner' - s.version = '6.0.1' + s.version = '6.0.2' s.summary = 'An universal scanner for Flutter based on MLKit.' s.description = <<-DESC An universal scanner for Flutter based on MLKit. @@ -21,7 +21,8 @@ An universal scanner for Flutter based on MLKit. # Flutter.framework does not contain a i386 slice, and MLKit does not support armv7. s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', - 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 armv7', + # TODO: add back arm64 (and armv7?) when switching to the Vision API. + 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 armv7 arm64', 'EXCLUDED_ARCHS[sdk=iphoneos*]' => 'armv7', } s.swift_version = '5.0' diff --git a/lib/src/mobile_scanner_controller.dart b/lib/src/mobile_scanner_controller.dart index e4edd86b4..6b2d718dc 100644 --- a/lib/src/mobile_scanner_controller.dart +++ b/lib/src/mobile_scanner_controller.dart @@ -186,6 +186,8 @@ class MobileScannerController extends ValueNotifier { /// Analyze an image file. /// /// The [path] points to a file on the device. + /// The [formats] specify the barcode formats that should be detected in the image. + /// If the [formats] are omitted or empty, all formats are detected. /// /// This is only supported on Android, iOS and MacOS. /// @@ -193,8 +195,11 @@ class MobileScannerController extends ValueNotifier { /// /// If an error occurred during the analysis of the image, /// a [MobileScannerBarcodeException] error is thrown. - Future analyzeImage(String path) { - return MobileScannerPlatform.instance.analyzeImage(path); + Future analyzeImage( + String path, { + List formats = const [], + }) { + return MobileScannerPlatform.instance.analyzeImage(path, formats: formats); } /// Build a camera preview widget. diff --git a/macos/mobile_scanner.podspec b/macos/mobile_scanner.podspec index 2fbf0360e..1aa906528 100644 --- a/macos/mobile_scanner.podspec +++ b/macos/mobile_scanner.podspec @@ -4,7 +4,7 @@ # Pod::Spec.new do |s| s.name = 'mobile_scanner' - s.version = '6.0.1' + s.version = '6.0.2' s.summary = 'An universal scanner for Flutter based on MLKit.' s.description = <<-DESC An universal scanner for Flutter based on MLKit. diff --git a/pubspec.yaml b/pubspec.yaml index 1255535e2..588e6e507 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: mobile_scanner description: A universal barcode and QR code scanner for Flutter based on MLKit. Uses CameraX on Android, AVFoundation on iOS and Apple Vision & AVFoundation on macOS. -version: 6.0.1 +version: 6.0.2 repository: https://github.com/juliansteenbakker/mobile_scanner screenshots: