Running chapter 9 example and the is failing with:
Thread 1: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
func TakeSnapshot() {
// 1
arView.snapshot(saveToHDR: false) { (image) in
// 2
let compressedImage = UIImage(
data: (image?.pngData())!)
// 3
UIImageWriteToSavedPhotosAlbum(
compressedImage!, nil, nil, nil)
}
}