Correct way to handle change in settings for IOS
<p>If the user did not allow access to photo album at the start, I will prompt with a pop up with Cancel and Settings to choose from. If he chooses settings, it will bring him to settings page where he can enable camera and photo Library for the app. However, as soon as the user toggles the camera or photo library switch in settings, my app crashes with "Message from debugger: Terminated due to signal 9" printout. Below is the code for my popup </p>

<pre><code>    @IBAction func cameraBarBtnPress(sender: AnyObject) {

    let photoAuthStatus = PHPhotoLibrary.authorizationStatus()

    switch photoAuthStatus {

    case .Authorized:
        presentFusumaCameraVC()

    case .Denied, .Restricted :

        showNeedPhotoAlbumAccessPopup()

    case .NotDetermined:
        PHPhotoLibrary.requestAuthorization({ (authStatus: PHAuthorizationStatus) in
            switch authStatus {
            case .Authorized:
                self.presentFusumaCameraVC()

            case .Denied, .Restricted :
                self.showNeedPhotoAlbumAccessPopup()

            case .NotDetermined:
                print("Shouldnt get to here")
            }
        })
    }
}

func showNeedPhotoAlbumAccessPopup() {
    let alertController = UIAlertController(title: "Enable Photo Album Access", message: "", preferredStyle: .Alert)
    let cancelAction = UIAlertAction(title: "Cancel", style: .Default, handler: nil)
    let settingsAction = UIAlertAction(title: "Settings", style: .Default, handler: { (action: UIAlertAction) in
        let settingsUrl = NSURL(string: UIApplicationOpenSettingsURLString)
        if let url = settingsUrl {
            UIApplication.sharedApplication().openURL(url)
        }
    })
    alertController.addAction(settingsAction)
    alertController.addAction(cancelAction)
    self.presentViewController(alertController, animated: true, completion: nil)
}
</code></pre>

<p>What would be the correct way to handle this so that the user can go back to the app and begin selecting the photos after toggling the switch?</p>