-
-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: report analyze image as unsupported on iOS Simulator #1275
fix: report analyze image as unsupported on iOS Simulator #1275
Conversation
@@ -22,5 +22,6 @@ class MobileScannerErrorCodes { | |||
const val NO_CAMERA_ERROR_MESSAGE = "No cameras available." | |||
const val SET_SCALE_WHEN_STOPPED_ERROR = "MOBILE_SCANNER_SET_SCALE_WHEN_STOPPED_ERROR" | |||
const val SET_SCALE_WHEN_STOPPED_ERROR_MESSAGE = "The zoom scale cannot be changed when the camera is stopped." | |||
const val UNSUPPORTED_OPERATION_ERROR = "MOBILE_SCANNER_UNSUPPORTED_OPERATION" // Reserved for future use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added here too, for feature parity with the iOS / macOS implementation, in case we need it in the future.
@@ -48,17 +48,17 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, | |||
var standardZoomFactor: CGFloat = 1 | |||
|
|||
public static func register(with registrar: FlutterPluginRegistrar) { | |||
#if os(iOS) | |||
#if os(iOS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatted the compiler preprocessor directives to not have an indent, which is commonplace for these.
It seems that the iOS Simulator does not support the neural engine features that are required to run the Vision API,
hence why it fails to create the underlying detection model.
Fixes #1269