When the app crashes, it shows (lldb) in the console. Not exactly sure why it crashes.
But I'm pretty sure it has to do with this function that presents the camera:
let imagePicker: UIImagePickerController! = UIImagePickerController()
func shootADance() {
if (UIImagePickerController.isSourceTypeAvailable(.camera)) {
if UIImagePickerController.availableCaptureModes(for: .rear) != nil {
//if the camera and rear camera is available, dod this
imagePicker.sourceType = .camera
imagePicker.mediaTypes = [kUTTypeMovie as String]
imagePicker.allowsEditing = false
imagePicker.delegate = self as? UIImagePickerControllerDelegate & UINavigationControllerDelegate
present(imagePicker, animated: true, completion: nil)
} else {
postAlert("Rear camera doesn't exist", message: "Application cannot access the camera.")
}
} else {
postAlert("Camera inaccessable", message: "Application cannot access the camera.")
}
}
Here's what comes up in the console
2017-07-25 04:16:02.602 appName[11003:] Firebase Analytics v.3600000 started
2017-07-25 04:16:02.602 appName[11003:] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see blockedLink)
2017-07-25 04:16:02.615: FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2017-07-25 04:16:02.653 appName[11003:] Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
2017-07-25 04:16:02.670 appName[11003:] The AdSupport Framework is not currently linked. Some features will not function properly. Learn more at 2017-07-25 04:16:02.691 Koala[11003:] Firebase Analytics enabled { (lldb)
It appears like there no error message but I know it's the ShootADance function (the source type)
Thank you in advance!