When I access my Photo Library with an UIImagePicker to choose a photo, the app shows me sometimes a black screen and sometimes a screen that says that I have to give permissions to my app to access the photos. But when I go to Settings -> Privacy -> Photos, there’s no app there and the app is nowhere to be seen in Settings. I read that I must add two values to my Info.plist but they didn’t worked either. Have anyone run with the same error? I’m working with xcode 7, swift 2.0 and iOS 9
This is where i prompt for user for Camera access
@IBAction func cameraButtonPressed(sender: UIButton) { let actionSheet = UIAlertController(title: nil, message: nil, preferredStyle: UIAlertControllerStyle.ActionSheet) let cancelAction = UIAlertAction(title: "Cancel", style: .Default) { (UIAlertAction) -> Void in self.dismissViewControllerAnimated(true, completion: nil) } let cameraAction = UIAlertAction(title: "Take Photo", style: .Default) { (UIAlertAction) -> Void in if UIImagePickerController.availableCaptureModesForCameraDevice(.Rear) != nil { self.imagePicker.allowsEditing = false self.imagePicker.sourceType = UIImagePickerControllerSourceType.Camera self.imagePicker.cameraCaptureMode = .Photo self.presentViewController(self.imagePicker, animated: true, completion: nil) } else { self.noCamera() } } let photoLibraryAction = UIAlertAction(title: "Photo Library", style: .Default) { (UIAlertAction) -> Void in self.imagePicker.sourceType = UIImagePickerControllerSourceType.PhotoLibrary self.presentViewController(self.imagePicker, animated: true, completion: nil) } actionSheet.addAction(photoLibraryAction) actionSheet.addAction(cameraAction) actionSheet.addAction(cancelAction) self.presentViewController(actionSheet, animated: true, completion: nil) }
Go to Settings-->>Privacy-->>Camera and turn the settings to ON for each app that you would like to have access to it. Go to Settings-->>Privacy-->>Photos and make sure that those apps have the Read & Write permissions.
Option 2: Manage app's privacy permission With this option, you can easily manage which app can access the camera. Step 1: Go to Settings > Privacy. Step 2: Tap on Camera to see which apps have access to it. You can allow or block apps using Camera from here.
On your iPhone or iPad, open Settings. Tap Photos. Select a permission option.
This issue appear in iOS 9 when your application Info.plist file contains a key: "CFBundleDisplayName" with empty string value.
You can enter your app name there and it should work.
In info.plist, "Bundle display name" field can not be empty.
Example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With