-
Notifications
You must be signed in to change notification settings - Fork 471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when trying to force unwrap fullResolution image when there is only nil #37
Comments
Hi @Anders123fr public private(set) lazy var fullResolutionImage: UIImage? = {
if let originalAsset = self.originalAsset {
if let fullResolutionImage = originalAsset.defaultRepresentation().fullResolutionImage() {
return UIImage(CGImage: fullResolutionImage.takeUnretainedValue())
}
}
return nil
}() Let me know if that works :) |
Hi, thanks for the quick reply! Here is the crash log:
However if you change the line to contain a ?, it won't crash but then the image is of course still not returned: Don't know why the compiler is not telling us to do so but it works. As the framework does not support photos from iCloud photo streams, which is requirement for my project, and because Luckily my deployment target is 8.0 so i can use the but this framework is great if you're building a backwards compatible app :) |
@Anders123fr |
I will release the 3.0.0 with Photos framework. develop :) |
The framework crashes when i pick an image from iCloud library that apparently doesn't contain a fullResolution image, which therefore crashes my app.
It happens on line 30, where
fullResolutionImage()
is called an force unwraps the fullResolutionImage but it is nil.Running latest version 2.3.6
The text was updated successfully, but these errors were encountered: