There are 8 significant updates to Xcode 14 that every iOS developer needs to know right now.
App icons, variants and run destinations just to name a few. So if you want to know all of them, make
sure to hit that SUBSCRIBE button and watch this video till the end. Now let's get into the details.
And if you want to join the community for not just iOS developers check out BEYOND CODE, it's
a rebeloper.com/community where you will be able to join our weekly events. So 4 of
one hour Zoom chest sessions with me on anything that the members would like to
talk to and also you get access to all of the introductions, ask questions, announcements, general,
just the whole community. So, yeah we can be an iOS community that helps each other out.
So again it's at rebeloper.com/community. So before I jump into Xcode 14 let me just tell you
that Xcode 14 is 30% smaller than Xcode 13. So that's a huge improvement. So what I have done,
I have downloaded Xcode 14 beta because at this stage it's in still in a beta.
If you haven't known how to do that then just check out the the link in the description or just
check out the previous video in this list. It will be available at the end of this video. So make sure
that you watch the whole video till the end. Now what I have done is just opened up a brand
new Xcode project. I have selected a multi-platform so yeah I can just teach you a little bit more
and this is how it looks like. Well almost because now I enable canvas and we are
going to talk about the first thing and that is Variants. As you can see here we have this a nice
iPhone and what we can do right over here is click on this button and select color scheme
variant and this is really, really awesome because now we can see our application side by side on
light and dark mode. Let's take a look at the other variants because there are two more. Orientation
variants, of course this is portrait, landscape left, landscape right. Really, really amazing that you can
see it all of this side-by-side. And finally my favorite, dynamic type versions and yeah this is
just awesome so you know how it will look with all dynamic types on all devices. Really, really
great. Now that's it for variants. Now let's take a look at code completion. I will just remove the
canvas for now because we are going to types of code. So let's create a new file. I will call
this a person because I'm going to create actually a model with this. So let's create a struct
and let's name this again person right over here and this person will have a name of course
of type string and a score maybe. Score of type Int and let's just start using this person.
Let's just create a private state variable called person right over here and if we would just want
to initialize this we would just have person name and score. Now nothing new right over here but
let's take a look at the new completion features that Xcode 14 has for us. So right off the bat
let's create our initializer and this is something new. As you can see Xcode suggests the name
and score and let's just hit that and it auto completes that. Real time saver right over here.
But again we didn't do anything much that can help us on the content here when we are creating our
state variable. So let's make this even better. Let's say we have an optional score right over
here in the initializer. Maybe some of the persons will not have a score. So what we want to do is set
it to an optional and set its default value to nil and of course we want to provide of score 0
right over here. Now let's take a look at how the person is initialized. So right over here
let me just move back a little bit, person and now you will see that we have this name and the
score property is kind of has an opacity, it is grayed out and what we need to know is that if we
tap right over here we are going to have only the name. If we want to have all of the optional
properties then we want to hit option and return and we will have this really nice name and score.
Now let's just comment that out. What I want to do here is just have both of them as an optional.
So I would just add in here as an empty string and now I can easily create these really nice
initializers for our optional persons and yeah that will use our initial values which is really,
really great, okay. Next up is SFSymbols inside the library. So right over here we have our
globe and let me just put back the canvas right over here and you will see that we have our hello
world and the globe. Now one cool thing is that if we highlight the globe we click on plus right
over here, the library will pop up. And make sure that you select the symbols there are a lot more
right over here and under the symbols now you can search for. Maybe just search for person right over
there and I will just go for person dot fill and if we double click right over here, let's just do that.
Oh! Well let's just select all the image and let's do that again. So sometimes it's just
going to add in the person name or sometimes it's just going to add in the whole image maybe
this is just a bug in Xcode 14 but yeah now you know how to add a system named image. It's really ,
really cool, okay. So that's how you can add SFSymbols inside from the library.
Now another thing and it's really, really cool. Supported destinations. This is really, really cool.
Let's just go right over here and you will see a new thing called supported destination and because
I have selected multi-platform it's going to add in iPhone iPad and Mac with the SDK of macOS.
If you have selected iOS, it will just add iPhone iPad and Mac with iPad support, but you can also
add in some new if you wanted to right over here. It's really, really great. So for example design for
iPad right over here. And that's all you have to do to support other type of destinations. No more
extra targets for us, which is really, really cool, okay. Next up on the list number 5
is run destination chooser. Now if you just go right over here you will see
a new run destination chooser. Here we have our Simulators our Max and we can filter according to
our needs. So let's just type in here Mac and it will just filter according to next. Also we
will be able to have the reasons and I do have some screenshots, I haven't used the simulators
that often so what we can do right over here is just have the most recent right over here.
This screenshot by the way has been taken from the WWDC videos, okay. Next up on the on the list is Feedback.
Now Feedback can be found under the Organizer. So let's just jump back right over here under window
just select Organizer, there we go. Let me just resize this and you will see the Feedback and of
course we are going to talk about hangs but feedback and hangs are the next two. I don't
have any feedback because I haven't set up my app just yet on test flight but this is where
you are going to have your feedbacks and hangs. And let me just give you a screenshot from WWDC
videos, this is how the feedback looks like. You can email the person who gave that
feedback. You can have all of these screenshots and messages in one place. Also number 7 is Hangs.
And hangs is basically when your app is hanging and that is really, really hard to debug
at this point your app is already on the App Store and it will just give you these hangs according to
priority how much percentage of your users have been affected, on what iOS version they
were affected. So it's really, really a great tool for debugging. Finally number 8 is
App Icon. So let's just jump right in back into Xcode beta and if we take a look at the assets
and select app icon. Now you will see that besides this usual, you know we have this usual
app icon set, we can also set, let just move this out of the way. So now we have iOS single size, macOS
just have all sizes and watchOS, well single size and all sizes. What does that actually mean?
Well if you take a look, a closer look right over here, let's just remove all of this. You see on iOS we
have only one iOS app icon that we have to add. On macOS well we add multiple ones and there
we go if you want to add kind of different icons for different sizes then just go ahead and on iOS
just select all sizes and then you get populated with what you are already familiar with, but I
really like the single size option for iOS. And that's it what's new for Xcode 14. Now if you do
want to learn how to download Xcode 14 beta go ahead and check out this video right over here.