Skip to content

Commit e01fbed

Browse files
Merge pull request #1226 from navaronbracke/arm64_simulators
fix: exclude arm64 simulators
2 parents 8d6907f + cbbb133 commit e01fbed

File tree

6 files changed

+24
-6
lines changed

6 files changed

+24
-6
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
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+
19
## 6.0.1
210

311
Bugs fixed:

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ dev.steenbakker.mobile_scanner.useUnbundled=true
6060
```
6161

6262
### 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+
6367
**Add the following keys to your Info.plist file, located in <project root>/ios/Runner/Info.plist:**
6468
NSCameraUsageDescription - describe why your app needs access to the camera. This is called Privacy - Camera Usage Description in the visual editor.
6569

ios/mobile_scanner.podspec

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
Pod::Spec.new do |s|
66
s.name = 'mobile_scanner'
7-
s.version = '6.0.1'
7+
s.version = '6.0.2'
88
s.summary = 'An universal scanner for Flutter based on MLKit.'
99
s.description = <<-DESC
1010
An universal scanner for Flutter based on MLKit.
@@ -21,7 +21,8 @@ An universal scanner for Flutter based on MLKit.
2121
# Flutter.framework does not contain a i386 slice, and MLKit does not support armv7.
2222
s.pod_target_xcconfig = {
2323
'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',
2526
'EXCLUDED_ARCHS[sdk=iphoneos*]' => 'armv7',
2627
}
2728
s.swift_version = '5.0'

lib/src/mobile_scanner_controller.dart

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,20 @@ class MobileScannerController extends ValueNotifier<MobileScannerState> {
186186
/// Analyze an image file.
187187
///
188188
/// 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.
189191
///
190192
/// This is only supported on Android, iOS and MacOS.
191193
///
192194
/// Returns the [BarcodeCapture] that was found in the image.
193195
///
194196
/// If an error occurred during the analysis of the image,
195197
/// 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);
198203
}
199204

200205
/// Build a camera preview widget.

macos/mobile_scanner.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
Pod::Spec.new do |s|
66
s.name = 'mobile_scanner'
7-
s.version = '6.0.1'
7+
s.version = '6.0.2'
88
s.summary = 'An universal scanner for Flutter based on MLKit.'
99
s.description = <<-DESC
1010
An universal scanner for Flutter based on MLKit.

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: mobile_scanner
22
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
44
repository: https://github.com/juliansteenbakker/mobile_scanner
55

66
screenshots:

0 commit comments

Comments
 (0)