Committed by
GitHub
Merge pull request #1226 from navaronbracke/arm64_simulators
fix: exclude arm64 simulators
Showing
6 changed files
with
24 additions
and
6 deletions
| 1 | +## 6.0.2 | ||
| 2 | + | ||
| 3 | +Bugs fixed: | ||
| 4 | +* Fixed a bug that prevented `analyzeImage` from actually accepting the configured formats. | ||
| 5 | + | ||
| 6 | +Improvements: | ||
| 7 | +* [iOS] Excluded the `arm64` architecture for Simulators, which is unsupported by MLKit 7.0.0. | ||
| 8 | + | ||
| 1 | ## 6.0.1 | 9 | ## 6.0.1 |
| 2 | 10 | ||
| 3 | Bugs fixed: | 11 | Bugs fixed: |
| @@ -60,6 +60,10 @@ dev.steenbakker.mobile_scanner.useUnbundled=true | @@ -60,6 +60,10 @@ dev.steenbakker.mobile_scanner.useUnbundled=true | ||
| 60 | ``` | 60 | ``` |
| 61 | 61 | ||
| 62 | ### iOS | 62 | ### iOS |
| 63 | + | ||
| 64 | +_iOS arm64 Simulators are currently not yet supported, until the migration to the Vision API is complete._ | ||
| 65 | +_See_ https://github.com/juliansteenbakker/mobile_scanner/issues/1225 | ||
| 66 | + | ||
| 63 | **Add the following keys to your Info.plist file, located in <project root>/ios/Runner/Info.plist:** | 67 | **Add the following keys to your Info.plist file, located in <project root>/ios/Runner/Info.plist:** |
| 64 | NSCameraUsageDescription - describe why your app needs access to the camera. This is called Privacy - Camera Usage Description in the visual editor. | 68 | NSCameraUsageDescription - describe why your app needs access to the camera. This is called Privacy - Camera Usage Description in the visual editor. |
| 65 | 69 |
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | # | 4 | # |
| 5 | Pod::Spec.new do |s| | 5 | Pod::Spec.new do |s| |
| 6 | s.name = 'mobile_scanner' | 6 | s.name = 'mobile_scanner' |
| 7 | - s.version = '6.0.1' | 7 | + s.version = '6.0.2' |
| 8 | s.summary = 'An universal scanner for Flutter based on MLKit.' | 8 | s.summary = 'An universal scanner for Flutter based on MLKit.' |
| 9 | s.description = <<-DESC | 9 | s.description = <<-DESC |
| 10 | An universal scanner for Flutter based on MLKit. | 10 | An universal scanner for Flutter based on MLKit. |
| @@ -21,7 +21,8 @@ An universal scanner for Flutter based on MLKit. | @@ -21,7 +21,8 @@ An universal scanner for Flutter based on MLKit. | ||
| 21 | # Flutter.framework does not contain a i386 slice, and MLKit does not support armv7. | 21 | # Flutter.framework does not contain a i386 slice, and MLKit does not support armv7. |
| 22 | s.pod_target_xcconfig = { | 22 | s.pod_target_xcconfig = { |
| 23 | 'DEFINES_MODULE' => 'YES', | 23 | 'DEFINES_MODULE' => 'YES', |
| 24 | - 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 armv7', | 24 | + # TODO: add back arm64 (and armv7?) when switching to the Vision API. |
| 25 | + 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 armv7 arm64', | ||
| 25 | 'EXCLUDED_ARCHS[sdk=iphoneos*]' => 'armv7', | 26 | 'EXCLUDED_ARCHS[sdk=iphoneos*]' => 'armv7', |
| 26 | } | 27 | } |
| 27 | s.swift_version = '5.0' | 28 | s.swift_version = '5.0' |
| @@ -186,6 +186,8 @@ class MobileScannerController extends ValueNotifier<MobileScannerState> { | @@ -186,6 +186,8 @@ class MobileScannerController extends ValueNotifier<MobileScannerState> { | ||
| 186 | /// Analyze an image file. | 186 | /// Analyze an image file. |
| 187 | /// | 187 | /// |
| 188 | /// The [path] points to a file on the device. | 188 | /// The [path] points to a file on the device. |
| 189 | + /// The [formats] specify the barcode formats that should be detected in the image. | ||
| 190 | + /// If the [formats] are omitted or empty, all formats are detected. | ||
| 189 | /// | 191 | /// |
| 190 | /// This is only supported on Android, iOS and MacOS. | 192 | /// This is only supported on Android, iOS and MacOS. |
| 191 | /// | 193 | /// |
| @@ -193,8 +195,11 @@ class MobileScannerController extends ValueNotifier<MobileScannerState> { | @@ -193,8 +195,11 @@ class MobileScannerController extends ValueNotifier<MobileScannerState> { | ||
| 193 | /// | 195 | /// |
| 194 | /// If an error occurred during the analysis of the image, | 196 | /// If an error occurred during the analysis of the image, |
| 195 | /// a [MobileScannerBarcodeException] error is thrown. | 197 | /// a [MobileScannerBarcodeException] error is thrown. |
| 196 | - Future<BarcodeCapture?> analyzeImage(String path) { | ||
| 197 | - return MobileScannerPlatform.instance.analyzeImage(path); | 198 | + Future<BarcodeCapture?> analyzeImage( |
| 199 | + String path, { | ||
| 200 | + List<BarcodeFormat> formats = const <BarcodeFormat>[], | ||
| 201 | + }) { | ||
| 202 | + return MobileScannerPlatform.instance.analyzeImage(path, formats: formats); | ||
| 198 | } | 203 | } |
| 199 | 204 | ||
| 200 | /// Build a camera preview widget. | 205 | /// Build a camera preview widget. |
| @@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
| 4 | # | 4 | # |
| 5 | Pod::Spec.new do |s| | 5 | Pod::Spec.new do |s| |
| 6 | s.name = 'mobile_scanner' | 6 | s.name = 'mobile_scanner' |
| 7 | - s.version = '6.0.1' | 7 | + s.version = '6.0.2' |
| 8 | s.summary = 'An universal scanner for Flutter based on MLKit.' | 8 | s.summary = 'An universal scanner for Flutter based on MLKit.' |
| 9 | s.description = <<-DESC | 9 | s.description = <<-DESC |
| 10 | An universal scanner for Flutter based on MLKit. | 10 | An universal scanner for Flutter based on MLKit. |
| 1 | name: mobile_scanner | 1 | name: mobile_scanner |
| 2 | 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. | 2 | 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. |
| 3 | -version: 6.0.1 | 3 | +version: 6.0.2 |
| 4 | repository: https://github.com/juliansteenbakker/mobile_scanner | 4 | repository: https://github.com/juliansteenbakker/mobile_scanner |
| 5 | 5 | ||
| 6 | screenshots: | 6 | screenshots: |
-
Please register or login to post a comment