Awalz / SwiftyCam

A Snapchat Inspired iOS Camera Framework written in Swift
BSD 2-Clause "Simplified" License
2.08k stars 326 forks source link

Remove hardcoded reaction to unauthorized/failed status #106

Open piv199 opened 7 years ago

piv199 commented 7 years ago
            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.

Awalz commented 7 years ago

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