Comments (7)
I wasn't able to reproduce this on an iPhone 6 Plus running iOS 9. I turned the capture on and waited 20 minutes but didn't see any issues. Since this is not something specific to MTBBarcodeScanner, and sounds more like an AVFoundation issue, I think your best bet is to use StackOverflow or file a bug report to Apple.
from mtbbarcodescanner.
+1, I'm having the same issue on my iPhone 6S Plus running iOS 9.3. On a seemingly random basis, sometimes as frequently as every 15-20 seconds, my session is interrupted or stopped (sometimes i get WasInterrupted notification, other times I get DidStopRunning notification). The torch also cuts off during these times. My best workaround was to observe for those notifications and call startRunning on the session and relight the torch manually each time that an interruption occurs.
This might occur more often while playing music in the background, because I have noticed few interruptions at one point while not playing music. But in further tests I can't prove a correlation – the rate of capture session stoppage is about the same even after playback is stopped. Average rate over an hour is about 75 interruptions / hour, with interruptions lasting 6-7 seconds in length (scanner unusable about 15% of the time). Interruption rate does vary, but doesn't get measurably better or worse over time as the app runs. I'll continue testing, troubleshooting, and trying solutions and post any good solutions that I find.
from mtbbarcodescanner.
Amazingly, the interruptions seem to be related to Headphones being plugged in! Unplug headphones, and no interruptions. Plug them back in, and the session is once again stopping itself. Problem solved?
from mtbbarcodescanner.
Were you ever able to track down a fix to this other then removing the headphones?
from mtbbarcodescanner.
Would love to know this as well. I had to write some hacky code to detect whether the session has crashed and restart it.
from mtbbarcodescanner.
I haven't had much luck reproducing this on my end with an iPhone 6S Plus running iOS 9.3.2. Is anyone able to reproduce this reliably with a set of steps?
I created a bare-bones implementation using AVFoundation in a separate Xcode project we can use. Hopefully this will help narrow it down a bit. If you're able to reproduce the issue in this project, please let me know, and I can investigate further (and move any fixes into MTBBarcodeScanner):
https://www.dropbox.com/s/us8eoz5bxtjxacy/SampleBarcodeProject.zip?dl=0
If this turns out to be an issue with AVFoundation, we can submit this project (and steps to reproduce) as a radar to Apple.
from mtbbarcodescanner.
This is more likely an issue from Apple side because the session is getting stop without no reason, i have write code with my own and same thing is happening. And yes session is getting frequent interruption while you plugin the headphones or playing music in background even if you have started camera and put it in background that also be case.
from mtbbarcodescanner.
Related Issues (20)
- Only works with iOS10+ after recent changes HOT 2
- Impossible to read CODABAR barcode HOT 1
- Disable rotation HOT 1
- Initial camera setting HOT 1
- Warnings HOT 4
- Call stopScanning crash in viewDidDisappear HOT 4
- Flutter + Xcode 8.0: 3 errors, 9 warnings HOT 1
- Catalyst Support? HOT 4
- Maximum of read multiple codes HOT 3
- Problem configurating scanner with QR and Barcode HOT 5
- output becomes Garbled text HOT 8
- Crash NSInvalidArgumentException *** -[AVCaptureMetadataOutput setMetadataObjectTypes:] Unsupported type found - use -availableMetadataObjectTypes HOT 3
- when barcode data increased it is difficult to read Code.. HOT 1
- UIView preview has issues during orientation changes HOT 6
- Define Barcodetype in Swift HOT 3
- Camera Unfreeze method not working on. HOT 3
- Unrecognized Barcode Style HOT 1
- Camera unfreeze is corrupting flash HOT 3
- Getting the bytes raw HOT 1
- It's crashing on iPad and iPhone after you try to scan QR code. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mtbbarcodescanner.