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 you need to add the key mentioned in below image if you are using camera or photo gallery in your app