alexhillc / AXPhotoViewer

An iOS/tvOS photo gallery viewer, useful for viewing a large (or small!) number of photos.
https://www.cocoacontrols.com/controls/axphotoviewer
MIT License
642 stars 120 forks source link

Crash when using the share button to save an image when device hasn't enabled photos permission #44

Closed eeallen1 closed 5 years ago

eeallen1 commented 5 years ago

This happens on iOS 12, not sure about previous OS versions.

Steps to reproduce:

  1. view a full-screen photo on a device that hasn't been prompted for photo permissions
  2. tap the share button, and when the share sheet comes up, tap "save image"

Then the app crashes with the following stacktrace. screen shot 2018-09-26 at 3 14 52 pm

My implementation is basic, so I think this should suffice, but let me know if you need anything else from me to diagnose the issue.

eeallen1 commented 5 years ago

Actually this can be solved by adding NSPhotoLibraryAddUsageDescription to your info.plist. Description here

I'll close the issue, as it has nothing to do with AXPhotoViewer specifically. Hope this helps anyone else who runs into this.