Using the sample app at https://developer.apple.com/library/ios/referencelibrary/GettingStarted/DevelopiOSAppsSwift/Lesson4.html#//apple_ref/doc/uid/TP40015214-CH6-SW1
iOS 9 simulator prompts for Photo authorization. Building the same app in iOS 10, making affordances for the updated API, crashes immediately upon tapping the imageView gesture recognizer (to present uiimagepicker).
I am never prompted for Photo Access authorizaiton. Further inspection shows that the authorization status is returning 'not determined'.
Running on device gave much better error information in the console.
This app has crashed because it attempted to access privacy-sensitive data without a usage description.
The app's Info.plist must contain an NSPhLibraryUsageDescription key with a string value explaining to the user how the
app uses this data.
All is well, now 🙂
From the docs:
Important: To protect user privacy, an iOS app linked on or after iOS 10.0, and which accesses the user’s photo library,
must statically declare the intent to do so. Include the NSPhotoLibraryUsageDescription key in your app’s Info.plist
file and provide a purpose string for this key. If your app attempts to access the user’s photo library without a
corresponding purpose string, your app exits.