-
Notifications
You must be signed in to change notification settings - Fork 464
iOS: pressing cancel doesn't stop scanning #60
Comments
Fixed with the mentioned merge request #55 and release 0.0.8. Can be closed. |
@jakolion do you get the FormatException on iOS? For me the scanner now stops and disappears, but I get neither an exception (not even in the last general catch block), nor a result. |
You are describing the behavior I had before version 0.0.8. The scanner disappeared and the previous page was shown but it was still running in the background. |
Not quite - the scanner is off, as far as I can see, but I'm still not getting any Exception (or empty result). It feels like the Future is somehow not resolving at all (and I have 0.0.8). |
After cancelling the scanner was still active in line 3 of my code above. There wasn't any result or exception as well. If you are really using version 0.0.8 then I don't have any idea. Currently it's working fine for me. |
I have the same issue. The app on iOS does not throw the format exception when I press cancel. Using 0.0.8 too. |
I'm facing same issue as @theneedyguy with version 0.0.8. |
still having this error in version 1.0.0, any fix? |
I have no way of testing this, but I may have a fix if someone could test it out and then commit it to the branch. in the file BarcodeScannerViewController.m change the method "cancel" to: - (void)cancel { and in barcode_scan.dart add: static const UserCancelled = 'USER_CANCELED'; for use in exception handling around BarcodeScanner.scan(); Hope this helps |
I have the same issue when using 1.0.0 |
I have the same issue 1.0.0 |
Ok, I figured it out, something just started working after resetting my codebase: Per instructions from @JohanSnygg above. This seems pretty obvious now... cancel is called, but nothing is returned, so the Future in Dart never completes...
Now we can check for the
I think this was the final goodness, change to
|
Hello! Do you have any ideas when this fixed version will be published at Dart's Repository? |
|
@victor5171 A new version is available |
This is my code:
Pressing cancel when the camera is turned on, I expect the "FormatException". On Android this is working fine. On iOS, the flash is turned off, the camera screen is popped and the view is going back the the previous page as expected. But in the background the scanning is still active and the code above is still in line 3. When holding the phone over a QR code it is scanned successfully and the code above is continuing.
Tested with iOS 11.4 (15F79) on iPhone 5s and with iOS 12.1 (16B92) on iPhone 8.
The text was updated successfully, but these errors were encountered: