2
votes

Does UIActivityViewController require Info.plist privacy keys: NSContactsUsageDescription or NSPhotoLibraryUsageDescription to email or save images to photo library?

I've never seen it crash during these activities in testing, but I am seeing some crash reports (not many) on iOS 10 devices with CRASHING_DUE_TO_PRIVACY_VIOLATION in the stack trace. The only place the App touches anything to do with privacy is if the user uses the capability I provide via UIActivityViewController activities to share a screenshot via email or save it to the photo library. This is an Apple supplied framework and my App doesn't have actual access to any of that data as far as I know?!

The documentation for UIActivityViewController says nothing about requiring those strings for it's access to contacts or the photo library during those type activities.

1

1 Answers

4
votes

NSPhotoLibraryUsageDescription is required to be set in info.plist if UIActivityViewController allows activity: UIActivityTypeSaveToCameraRoll.

This was not showing up as a crash because if the user is logged into iCloud and uses share to photo stream that seemed to work fine without the privacy key, but when the OTHER less prominent option to Save to camera roll is used, that does crash without the key.

You'd think they would mention that in the docs ;)