{"action":"created","issue":{"url":"https://api.github.com/repos/mikebuss/MTBBarcodeScanner/issues/66","repository_url":"https://api.github.com/repos/mikebuss/MTBBarcodeScanner","labels_url":"https://api.github.com/repos/mikebuss/MTBBarcodeScanner/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/mikebuss/MTBBarcodeScanner/issues/66/comments","events_url":"https://api.github.com/repos/mikebuss/MTBBarcodeScanner/issues/66/events","html_url":"https://github.com/mikebuss/MTBBarcodeScanner/issues/66","id":136381755,"number":66,"title":"AVCaptureSession Stop Running","user":{"login":"hardikdevios","id":6657591,"avatar_url":"https://avatars.githubusercontent.com/u/6657591?v=3","gravatar_id":"","url":"https://api.github.com/users/hardikdevios","html_url":"https://github.com/hardikdevios","followers_url":"https://api.github.com/users/hardikdevios/followers","following_url":"https://api.github.com/users/hardikdevios/following{/other_user}","gists_url":"https://api.github.com/users/hardikdevios/gists{/gist_id}","starred_url":"https://api.github.com/users/hardikdevios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hardikdevios/subscriptions","organizations_url":"https://api.github.com/users/hardikdevios/orgs","repos_url":"https://api.github.com/users/hardikdevios/repos","events_url":"https://api.github.com/users/hardikdevios/events{/privacy}","received_events_url":"https://api.github.com/users/hardikdevios/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-25T12:59:57Z","updated_at":"2016-02-25T21:41:31Z","closed_at":"2016-02-25T21:41:31Z","body":"**First of all, Thanks for the Lib**\r\nI have few questions like **AVCaptureSession Interruption**.\r\n\r\nSome time Session being stop after few seconds and was unable to detect the error, i have  put the Debug points in this lib but nothing fire and camera stops scanning, So after little bit more research i have found one thing that some notifications will be called like \r\n\r\n```\r\n- AVCaptureSessionRuntimeErrorNotification\r\n- AVCaptureSessionInterruptionEndedNotification\r\n- AVCaptureSessionWasInterruptedNotification\r\n```\r\n\r\nAnd after adding this Observers in my controller i came up with this error in my Log\r\n\r\n```\r\nNSConcreteNotification 0x13f1dc0f0 {name = AVCaptureSessionRuntimeErrorNotification; object = <AVCaptureSession: 0x13f506680 [AVCaptureSessionPresetHigh]>\r\n\t<AVCaptureDeviceInput: 0x13dfc4ae0 [Back Camera]> -> <AVCaptureStillImageOutput: 0x13f360c50>\r\n\t<AVCaptureDeviceInput: 0x13dfc4ae0 [Back Camera]> -> <AVCaptureVideoPreviewLayer: 0x13f182030>\r\n\t<AVCaptureDeviceInput: 0x13dfc4ae0 [Back Camera]> -> <AVCaptureMetadataOutput: 0x13f35c610>; userInfo = {\r\n    AVCaptureSessionErrorKey = \"Error Domain=AVFoundationErrorDomain Code=-11800 \\\"The operation could not be completed\\\" UserInfo={NSUnderlyingError=0x13f1de2f0 {Error Domain=NSOSStatusErrorDomain Code=-16811 \\\"(null)\\\"}, NSLocalizedFailureReason=An unknown error occurred (-16811), NSLocalizedDescription=The operation could not be completed}\";\r\n}}\r\n```\r\n\r\n_So My question is_\r\n1. Why AVSession keeps stoping automatically?\r\n2. Can we handle this in better way using this lib?\r\n\r\n> \r\nTo reproduce this issue in your demo you can just go to basic example and Click start scanning and wait for some minutes or use it for some minutes.this method will fire and session will stop scanning.Thanks"},"comment":{"url":"https://api.github.com/repos/mikebuss/MTBBarcodeScanner/issues/comments/188999357","html_url":"https://github.com/mikebuss/MTBBarcodeScanner/issues/66#issuecomment-188999357","issue_url":"https://api.github.com/repos/mikebuss/MTBBarcodeScanner/issues/66","id":188999357,"user":{"login":"mikebuss","id":1574304,"avatar_url":"https://avatars.githubusercontent.com/u/1574304?v=3","gravatar_id":"","url":"https://api.github.com/users/mikebuss","html_url":"https://github.com/mikebuss","followers_url":"https://api.github.com/users/mikebuss/followers","following_url":"https://api.github.com/users/mikebuss/following{/other_user}","gists_url":"https://api.github.com/users/mikebuss/gists{/gist_id}","starred_url":"https://api.github.com/users/mikebuss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikebuss/subscriptions","organizations_url":"https://api.github.com/users/mikebuss/orgs","repos_url":"https://api.github.com/users/mikebuss/repos","events_url":"https://api.github.com/users/mikebuss/events{/privacy}","received_events_url":"https://api.github.com/users/mikebuss/received_events","type":"User","site_admin":false},"created_at":"2016-02-25T21:41:31Z","updated_at":"2016-02-25T21:41:31Z","body":"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. "}}