Skip to content

Commit

Permalink
Merge pull request #877 from navaronbracke/fix_double_conversion_crash
Browse files Browse the repository at this point in the history
fix: Fix conversion crash in iOS
  • Loading branch information
navaronbracke authored Nov 22, 2023
2 parents 9835ade + 006e235 commit efc05b4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 3.5.3
## 3.5.4
Bugs fixed:
* Fixed a bug with an implicit conversion to integer for the scan timeout for iOS. (thanks @EArminjon !)

Expand Down
2 changes: 1 addition & 1 deletion ios/Classes/MobileScannerPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin {
let returnImage: Bool = (call.arguments as! Dictionary<String, Any?>)["returnImage"] as? Bool ?? false
let speed: Int = (call.arguments as! Dictionary<String, Any?>)["speed"] as? Int ?? 0
let timeoutMs: Int = (call.arguments as! Dictionary<String, Any?>)["timeout"] as? Int ?? 0
self.mobileScanner.timeoutSeconds = timeoutMs / Double(1000)
self.mobileScanner.timeoutSeconds = Double(timeoutMs) / Double(1000)

let formatList = formats.map { format in return BarcodeFormat(rawValue: format)}
var barcodeOptions: BarcodeScannerOptions? = nil
Expand Down
2 changes: 1 addition & 1 deletion ios/mobile_scanner.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
Pod::Spec.new do |s|
s.name = 'mobile_scanner'
s.version = '3.5.3'
s.version = '3.5.4'
s.summary = 'An universal scanner for Flutter based on MLKit.'
s.description = <<-DESC
An universal scanner for Flutter based on MLKit.
Expand Down
2 changes: 1 addition & 1 deletion macos/mobile_scanner.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
Pod::Spec.new do |s|
s.name = 'mobile_scanner'
s.version = '3.5.3'
s.version = '3.5.4'
s.summary = 'An universal scanner for Flutter based on MLKit.'
s.description = <<-DESC
An universal scanner for Flutter based on MLKit.
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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: 3.5.3
version: 3.5.4
repository: https://github.com/juliansteenbakker/mobile_scanner

environment:
Expand Down

0 comments on commit efc05b4

Please sign in to comment.