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)
}
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.
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