I'm working on iOS simulator and am facing issues for requesting permissions.
My app was working properly and it could access to photo library, camera and location service. But after installing new XCode (8.1), I run the app on simulator, the app is not allowed to use photo library or camera or location service any more.
I tried to ask the permission programmatically, but it did not show permission request dialog and always return denied status even though I added the privacy descriptions and bundle display name.
Try to delete the simulator in
~/Library/Developer/CoreSimulator/Devices/xxxxx-xxx-xxxx
, and copy a new one from other machineI found the issue. This is because your Xcode is not put in Applications folder. Move Xcode to this folder and enjoy.
Make sure your
.plist
looks like thisAnd also if you disabled any changes to photo library privacy in your restrictions your app won't be able to use your photo library (it won't even ask for permission) until you turn off restrictions.