Jason, thank you very much! This almost works a treat! You do need to change a few iosViews as well and I don’t think the editedImage needs to change, but the image comes across perfect! The only snag is even though the PicturePickerController.sourceType is set to UIKit.UIImagePickerController.Source.Camera, it brings you to the photo library and I can’t get it to use the Camera
Chris check the Source enumeration in the UIImagePickerController and make sure that Camera = 1 and PhotoLibrary = 0.
Public Enum Source Camera = 1 PhotoLibrary = 0 SavedPhotoAlbum = 2 End Enum
Thanks Jason - Ya, that’s what they’re set to…
Jason this is the sample project I’m using to test your code:
Thanks for any help
Chris I haven’t had a chance to compare the code to work out what might be different, but just check that you’re using a real device as the iOS Simulator doesn’t support the camera.
Thanks Jason. I appreciate that. Yes, I’m trying it on an iPhone. Thanks very much for the time you’ve already offered.
If anyone else want’s to check the code and has the time, I’d really appreciate it. It works perfect except it’s calling the photo library and not the camera. It’s basically iOSkit with the small change Jason suggested to changing originalImage to a picture and Jason’s code.
Thanks for any help
Chris I notice in the test project you are missing the camera capability setting. It might be the case that the UIImagePickerController defaults to the photo library if it can’t request camera permissions from the user.
To add this, click on iOS within Build Settings, then click on the gear icon and switch on “Camera Access”. You might also need to click on Options and enter an explanation for the plist which will be displayed for the user when they first launch the camera and grant permission.
Hi Jason. Thanks very much for looking at this, but alas, it’s not the answer. I had tried it in the past, but set it back to default as it had no effect. Funnily enough, using the MobileImagePicker doesn’t seem to require Camera Access switched ON…
I’m just reaching out to the Community again, hoping someone in the know has a few minutes to spare to have a look this project :
to see why the Photo Library is called instead of the Camera.
I appreciate any help at all to point me in the right direction