The application that i am working on runs on both iPhone & iPad . One of the functionality that the application has, is to capture image from camera. I am using UIImageP
Here's how you can set an environmental variable: https://stackoverflow.com/a/31874419/3724800
And here's the code I use to open the camera in a Universal app:
if UIImagePickerController.isSourceTypeAvailable(.camera) {
let imagePicker = UIImagePickerController()
imagePicker.delegate = self
imagePicker.sourceType = .camera;
imagePicker.allowsEditing = false
present(imagePicker, animated: true, completion: nil)
}