Manual camera controls (Declaremaker)

Full manual control of the iPhone camera has been introduced with iOS8. I’m trying to get Apple’s sample code for manual camera control to work in Xojo. There was a great video on this during WWDC.

I managed to convert these Apple docs to a Xojo project with Declaremaker. However, it doesn’t compile.

Any declare-wizards out there who can figure this out?

might be nice to see where in your code it doesn’t compile…

I thought the Camera support required additonal view level delegates that I thought someone said was not currently supported?

Too many errors to mention, Dave.
Here’s the project.

[quote=154754:@Vincent Verweij]Full manual control of the iPhone camera has been introduced with iOS8. I’m trying to get Apple’s sample code for manual camera control to work in Xojo. There was a great video on this during WWDC.

I managed to convert these Apple docs to a Xojo project with Declaremaker. However, it doesn’t compile.

Any declare-wizards out there who can figure this out?[/quote]

Have you tried the camera control project Jason King posted here https://forum.xojo.com/18018-barcode-scanning-ios

Hi Vincent, I fixed your project so it compiles. The problem is that DeclareMaker cannot create structures so there was a missing SCNMatrix4 structure. After adding that, updating the constants to be of type Text, and changing the return type of instancetype to SCNCamera of the shared method, everything compiles nicely.
https://www.dropbox.com/s/h42csrmlb8un235/myapp%20copy.xojo_binary_project?dl=0

Awesome, thanks!

Just checking that this code is to retrieve a photo from the camera library and not to actually control the camera and take a photo?

This was for scene kit camera, not device cameras. To retrieve a picture from the camera roll of take a picture, check out my iOSKit which has implementations for both.

Starting with 2016r2 you can also use the new iOSPicturePicker class to take a picture using the camera or to select a picture from the camera roll or library.

Would be nice if more of the useful properties were available for use though. I played with it then went back to my own because it was so limited.