{"action":"created","issue":{"url":"https://api.github.com/repos/TheLevelUp/ZXingObjC/issues/294","repository_url":"https://api.github.com/repos/TheLevelUp/ZXingObjC","labels_url":"https://api.github.com/repos/TheLevelUp/ZXingObjC/issues/294/labels{/name}","comments_url":"https://api.github.com/repos/TheLevelUp/ZXingObjC/issues/294/comments","events_url":"https://api.github.com/repos/TheLevelUp/ZXingObjC/issues/294/events","html_url":"https://github.com/TheLevelUp/ZXingObjC/issues/294","id":169791510,"number":294,"title":"EXC_BAD_ACCESS in ZXCapture replaceInput method","user":{"login":"maxkorytko","id":5502840,"avatar_url":"https://avatars.githubusercontent.com/u/5502840?v=3","gravatar_id":"","url":"https://api.github.com/users/maxkorytko","html_url":"https://github.com/maxkorytko","followers_url":"https://api.github.com/users/maxkorytko/followers","following_url":"https://api.github.com/users/maxkorytko/following{/other_user}","gists_url":"https://api.github.com/users/maxkorytko/gists{/gist_id}","starred_url":"https://api.github.com/users/maxkorytko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxkorytko/subscriptions","organizations_url":"https://api.github.com/users/maxkorytko/orgs","repos_url":"https://api.github.com/users/maxkorytko/repos","events_url":"https://api.github.com/users/maxkorytko/events{/privacy}","received_events_url":"https://api.github.com/users/maxkorytko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-08-07T11:11:28Z","updated_at":"2016-09-15T07:20:40Z","closed_at":null,"body":"Hi,\r\n\r\nI'm testing my app in iOS 10 and Xcode 8 beta 3. I've come across an app crash in ZCCapture class. I'm using CocoaPods to bring ZXingObjC into my project: pod 'ZXingObjC', '3.1.0'\r\n\r\nThe crash started to happen in iOS 10.\r\n\r\nAttached is the screenshot:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/5502840/17462047/fea5e348-5c6d-11e6-931c-bf388a6de6d8.png)\r\n\r\nPlease help."},"comment":{"url":"https://api.github.com/repos/TheLevelUp/ZXingObjC/issues/comments/247255149","html_url":"https://github.com/TheLevelUp/ZXingObjC/issues/294#issuecomment-247255149","issue_url":"https://api.github.com/repos/TheLevelUp/ZXingObjC/issues/294","id":247255149,"user":{"login":"rayapudicb","id":3790822,"avatar_url":"https://avatars.githubusercontent.com/u/3790822?v=3","gravatar_id":"","url":"https://api.github.com/users/rayapudicb","html_url":"https://github.com/rayapudicb","followers_url":"https://api.github.com/users/rayapudicb/followers","following_url":"https://api.github.com/users/rayapudicb/following{/other_user}","gists_url":"https://api.github.com/users/rayapudicb/gists{/gist_id}","starred_url":"https://api.github.com/users/rayapudicb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rayapudicb/subscriptions","organizations_url":"https://api.github.com/users/rayapudicb/orgs","repos_url":"https://api.github.com/users/rayapudicb/repos","events_url":"https://api.github.com/users/rayapudicb/events{/privacy}","received_events_url":"https://api.github.com/users/rayapudicb/received_events","type":"User","site_admin":false},"created_at":"2016-09-15T07:20:40Z","updated_at":"2016-09-15T07:20:40Z","body":"I fixed it \r\nhttp://useyourloaf.com/blog/privacy-settings-in-ios-10/\r\nU need to check add the property in plist and the before accessing the camera u need to write the code snipit \r\n-(void)goToCamera{\r\nAVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];\r\nswitch (authStatus) {\r\ncase AVAuthorizationStatusRestricted:\r\n[self camDenied];\r\ncase AVAuthorizationStatusNotDetermined:{\r\n[AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL granted)\r\n{\r\nif(granted)\r\n{\r\nNSLog(@\"Granted access to %@\", AVMediaTypeVideo);\r\n[self createCam];\r\n}\r\nelse\r\n{\r\nNSLog(@\"Not granted access to %@\", AVMediaTypeVideo);\r\n[self camDenied];\r\n}\r\n}];\r\n}\r\ncase AVAuthorizationStatusAuthorized:\r\n[self createCam];\r\nbreak;\r\n\r\n    default:\r\n        break;\r\n}\r\n\r\n}"}}
{"actor":{"display_login":"rayapudicb"}}