Ios camera

Hi all,

Just starting to get into using Xojo for an ios project.

I have been looking at the documentation
to see how to access the camera. I need to programmatically take a picture and process that picture.

I am guessing this is not included, so is there a plugin that can do this?

Thanks

Here’s a short video about doing this with MobileImagePicker.

https://youtu.be/LOalWuUU1F4
Source: https://documentation.xojo.com/topics/user_interface/ios/ios_controls/image_picker.html

' This code lets the user pick a picture from the camera:
PicturePicker1.Source = MobileImagePicker.Sources.Camera
PicturePicker1.Show

' This code in the Selected event handler displays the selected picture in an Image Viewer:
MyImageViewer.Image = pic

You can also access the camera with AVFoundation from iOSKit (GitHub - kingj5/iOSKit). There are multiple example views for AVFoundation depending on what you need to accomplish.

Jason,

I download the code from the link you provided. I can’t find any documentation on implementing
this? Can I get a link showing what to do with all this code and using it?

Thanks again :grinning:

To use it, open the project, then copy the Modules folder from iOSKit into your project. That will allow you to use the code in your app. The example view a folder contains several examples of using different parts of the code. I encourage you to run the project which will launch the sample app and sample views to see what might be useful to you.

Hi, is there any option to select WHICH camera should be used?!
Because Android and IOS habe two of them: Main camera (is used by default ) and the back camera (“selfie camera”) i want to use.
Now , without an option to use , like something MobileImagePicker.Sources.Camera**.back**
the user must switch everytime from main camera (default) to the back /Selfie. :frowning:
PS: Some declares needed for Andriod needed? Android solution would be prefereded… but also IOS solution helpful.
THANKS

Thanks