App crashing when saving photos from WKWebViewby
I stumbled upon a crash in my app. In my app I have a WKWebView that lets user access web. I tried saving image from a website by long pressing - general way we do in our iOS safari - and app crashed. This user experience behaviour of long pressing and saving image is very common.
The crash error is:
My app doesn’t have the permission to write photo to device for there is no such feature in the app that requires photo write permission. Crash makes sense and this infact is considered an indirect feature where user may try to save photos from WKWebView into device. I should handle this user function too that requires write permission.
Simple solution is to include the NSPhotoLibraryAddUsageDescription permission entry to info.plist of the project.
You might also like: UIImagepicker controller allowsEditing not working