I am using XCode 8 and testing with iOS 10.2 Beta.
I have added the Photos, PhotosUI and MobileCoreServices frameworks to project.
Very simple code:
In iOS 10, Apple has changed how you can access any user private data types.
You need to add the Privacy - Photo Library Usage Description key to your app’s Info.plist and their usage information.
For more information please find the below GIF.
Or if you want to add via info.plist then you need to add NSPhotoLibraryUsageDescription key.
Just copy and paste below string in info.plist.
NSPhotoLibraryUsageDescription
Take the photo
Please find the below GIF for more information.