Hey everybody this is Caleb with Debb slopes and I'm just here to give you a quick little update video
for the core a section.
Apple has changed something an X code 9 Beta 4 that you need to know about.
So you may have gotten to this point where you're setting up the settings for capture photo settings
but in X code 9 Beta 4 you're going to start to notice that it says that available preview photo pixel
format types is no longer available.
That's a problem.
And if you actually look at the definition of the preview photo format from Apple's documentation you
can see that it's a dictionary that must contain the K CV pixel buffer pixel format type key and you
need to choose one of the pixel format types listed in the available preview photo pixel format types
array.
But that's not available anymore so I want to show you the new way to do it so that you can get this
back up and running again.
So go ahead and instead of using a preview pixel type like this and then manually setting a preview
format all you need to do is actually get rid of this Apple no longer uses it.
And for the preview photo format what you can actually do is you can just go into settings and you can
go ahead and set it with the embedded thumbnail photo format because that's what we're using to show
our photo in the image view is we're just using the embedded thumbnail photo format.
That's basically what we were creating with the previous way of doing this.
But when we do this you'll see and I don't know if you saw this in the Apple documentation but preview
photo format is actually a dictionary.
And it requires I think string you and a string and then any for its other value.
And if you look embedded thumbnail photo format is the same thing.
It's a dictionary that uses a string and any.
So we're basically just saying that we want our photos to be the same format and size as a thumbnail.
So when you add this you can build and run and it works perfectly.
Let me show you me pull up in quick time here.
Let's do a movie recording of my iPhone because I need the camera.
And here we go.
When you tap on the screen takes a photo and it loads it up just like we have been doing.
Of course you're not hearing anything because I have my sound disabled but you can see that it is definitely
taking photos and saving them just like before.
So this is just a quick little update video for the core section.
Thanks guys and keep rocking on.