5

The code below shows an example for my access to the image lib. No matter where I call the code (view) I do not see the permission dialog from the phone popping up and therefore cannot allow my app to access either camera or library.

Also, the privacy settings do not show my app either. Any thoughts? I'm going nuts.

       let imgPicker = UIImagePickerController()
        imgPicker.sourceType = UIImagePickerControllerSourceType.PhotoLibrary
        imgPicker.modalPresentationStyle = UIModalPresentationStyle.Popover
        self.presentViewController(imgPicker, animated: true, completion: nil)

another way I tried

            if UIImagePickerController.isSourceTypeAvailable(UIImagePickerControllerSourceType.Camera) {
                let imagePicker:UIImagePickerController = self.imagePickerController

                imagePicker.allowsEditing       =   true
                imagePicker.sourceType          =   UIImagePickerControllerSourceType.Camera
                imagePicker.cameraCaptureMode   =   UIImagePickerControllerCameraCaptureMode.Photo
                imagePicker.cameraDevice        =   UIImagePickerControllerCameraDevice.Rear
                imagePicker.showsCameraControls =   true
                imagePicker.navigationBarHidden =   true
                imagePicker.toolbarHidden       =   true
                imagePicker.delegate = self

            self.presentViewController(imagePicker, animated: true, completion: nil)
            }
DirkLX
  • 1,317
  • 1
  • 10
  • 16

3 Answers3

2

You need to set a new pair of Info.plist values, same as the String for Location Services would be in iOS8:

Just set your description string for those.

Info.plist

longbow
  • 1,593
  • 1
  • 16
  • 39
2

Check info.plist.

if "Bundle display name" set as nothing,

At iOS 8.1 will popup permission window like this

"" Would Like to Access Your Photos

But at iOS 9, there is no popup permission at all.

Also, no permission setting, at Setting > Privacy > Photos > Your app name.

To solve this,

Remove "Bundle display name" in your info.plist.

Taekyu Lee
  • 29
  • 1
  • 3
  • Mine did not have Bundle display name to begin with and has this issue. What to do then? – durazno Nov 25 '15 at 20:07
  • I cant comment on if removing it all together is the correct method, BUT i just filled in the 'string' area with the actual name of the app, works. – Chris J Feb 22 '16 at 02:51
  • This is definitely a wrong answer. The correct answer is what @longbow said, you have to fill in the appropriate info.plist strings. – barndog Mar 06 '16 at 20:32
0

Apparently this appears to be an issue with iOS9. For some reason the permission access dialog does not pop up. I have successfully tested on iOS8, using the same code.

DirkLX
  • 1,317
  • 1
  • 10
  • 16