SwiftyCam icon indicating copy to clipboard operation
SwiftyCam copied to clipboard

Remove hardcoded reaction to unauthorized/failed status

Open piv199 opened this issue 6 years ago • 1 comments

			case .notAuthorized:
				// Prompt to App Settings
				self.promptToAppSettings()
			case .configurationFailed:
				// Unknown Error
				DispatchQueue.main.async(execute: { [unowned self] in
					let message = NSLocalizedString("Unable to capture media", comment: "Alert message when something goes wrong during capture session configuration")
					let alertController = UIAlertController(title: "AVCam", message: message, preferredStyle: .alert)
					alertController.addAction(UIAlertAction(title: NSLocalizedString("OK", comment: "Alert OK button"), style: .cancel, handler: nil))
					self.present(alertController, animated: true, completion: nil)
				})

Create optional delegate methods, and if they are absent call such implementation... There are some cases when you need not to show alert, but some view on your UI.

piv199 avatar Aug 30 '17 05:08 piv199

This is a good idea. I will add this on a future release

Awalz avatar Aug 30 '17 17:08 Awalz