Read the transcript
Jeroen Leenarts: Hi, and welcome
to episode 83 of my podcast. My
name is John Lennon's and I've
been developing software for
over 20 years developing iOS
apps for 10 years, and I'm
running the Dutch kolkhoz for
over nine years. If you're an
iOS app developer, you should
listen to my podcast because it
will keep you updated on
interesting articles,
conferences and events you might
not have heard about. In this
episode, I'm going to talk about
a lot of things about WWDC, all
new framework presents that WWDC
22 What's new in Swift, 5.7,
Swift 5.7 new optional unwrap
syntax. What's the difference
between any and some in Swift
5.7 using the Psalm and any key
words to reference generic
protocols in Swift 5.7 Trying
new Swift features on Linux via
Visual Studio Code def
containers. What's new is swift
UI for iOS 16 overview of the
new Swift UI navigation API's
iOS 16 notable UI Kit additions,
creating a detent with a custom
height in iOS 16. What's new in
Xcode 14, Xcode integration of
Swift package plugins in Xcode
14. Use Xcode for server side
development and setting up your
first CarPlay app. So that's a
whole bunch of articles I want
to go through. So we'll just see
where we end up. And yeah, it's
just so much interesting and
cool stuff that has been
announced during the WWDC last
week. And as an additional extra
piece about CarPlay that I'm
looking into right now, because
I will be getting a new car in
July that is CarPlay enabled. So
all the more reason to start
digging into that as well. And I
must say that the entire WWDC
cycle this year was very
enjoyable. I did a lot of
content related work with with
my team at stream and also with
myself with podcasting. And I
think overall the the end result
was very neat. And yeah, I spoke
a lot of people online about the
new WWDC announcements and what
they thought. And we were also
able to share what our thoughts
are. And yeah, just the
interaction online was really
great. So things are going well
in that regard. And now after
the busy WWDC week, we're back
into a more relaxed state, I
will at least that's what I
should be. But tomorrow evening,
when I'm recording this, I will
be presenting at Cocottes. And
now in the Netherlands, in the
stream office in Amsterdam, and
then the week after, on June 24.
I will be presenting at at DEF
CON as well. And at DEF CON will
be a very interesting talk
because it's a non technical
talk yet again, it's about the
developer manual, how can you as
a non technical person interacts
with technical people that do
software development and make
sure that the two of you are in
alignment with each other. And
that the software developers in
the end will build what you as a
business person are actually
looking for, to be credit, which
is software conducted. See, I
haven't even recovered from
that. But headfirst into
additional work after that,
again, fortunately, last
weekend, I was able to have a
nice relaxing weekend with my
family and my own parents that
they were married 50 years,
sometime last year. And we
finally were able to go on a
family weekend with the six of
us to celebrate this event. It
was basically our gift to my
parents as a family so that they
could have like a nice relaxing
weekend with to have their
grandchildren on site as well.
So that was really good. Very
relaxing, I was able to unplug.
Most of the time. I just did a
few minor things during the
weekend. So that was very
enjoyable, very relaxing. And we
had good luck with the weather
as well, because it was like 20
degrees Celsius all the time the
entire weekend, no rain. So we
were able to enjoy ourselves
outside a lot because it was in
a cabin in a forested area. And
then having nice weather is very
good to have. And because a wet
forest is not a pleasant place
to be if you asked me. So yeah,
let's just get started with the
first article. And then we'll
just wrap up after that. And
then we'll talk to you again
next week. Right?
So the first article, all new
frameworks presented at WWDC 22.
This is an article by Marco
Heidinger. And basically it's a
list of frameworks that were new
and announced by Apple during
the WWDC, it's part of his apple
frameworks site. It's a website
that allows you to inspect which
frameworks were released with
which versions of Apple's
platforms. So for instance, if
you look at the, let's say, app
Eclipse framework that was
released in iOS 14, Mac,
catalyst 14 and iPad os 14, so
that's pretty obvious what's
happened there. But if you look
at for instance, the
authentication services
framework that was released on
iOS 12, Mac OS 10 point 15 Watch
was six TV OS 13, the Mac
catalyst 13, and iPad os 12. So
you can quickly inspect which
versions of a platform a
framework was May 1 made
available, and If you click on
the links on this website, you
jump to the documentation on
this specific framework on the
Apple website immediately. So
very convenient if you want to
have a good look at what Apple
has announced as frameworks in
this year, WWDC. So, you can
quickly see What's New in iOS
16. Mac OS 13. And yeah, just a
useful resource to have a look
at the second article is by Paul
Hudson, it says big what's new
in Swift 5.7 article, it's a big
overview of what has been on the
language level been announced in
the latest Xcode release. Of
course, Swift 5.7 has been
released a little bit earlier,
but now it is part of the Xcode
IDE. A great article with a lot
of links to the underlying
specification requests. And all
the information and code samples
really get you up to speed on
what you should be now what you
should be aware of with the
latest Swift language features.
One of the cool features of
Swift 5.7 that I really like is
the new optional unwrapping
syntax. And John Sandow has a
nice article about that on his
swift by Sunday blog. And it's
it's a nice overview with a more
elaborate code sample compared
to Paul Hudson's article on what
this new optional unwrapping
syntax allows you to do. It
basically makes your F flat and
cartlett statements a little bit
more compact. It's really nice
in the sense that, yeah, it's,
it's just a convenience,
ergonomic feature that really
helps you with making sure that
you don't have to, like type too
many of the same words. So while
creating your source code, but
there was one feature in Swift
5.7 that I had a bit of a
struggle with, and that's the
any and some keywords in nursery
5.7 And that's where the article
by Daniel also comes in, what's
the difference between any and
some in Swift? 5.7. So, in Swift
5.1, Apple introduced the some
keywords, this keyword was a key
in making straight UI work,
because the view protocol
defines itself requirements. The
thing is the some keyword fixes
an issue that you might be
having with concrete associated
types. And there's some details
involved with the end end some
keywords in Swift, that that has
to be fixed in Swift 5.7. And I
really think that the some key
words is, it's to me it sounds
like the same like any rights,
you have somewhere you have any
I don't care. But there is a
small difference between the
two. And they each solve a very
specific situation that you can
run into with, with type
inference in in Swift. So it's
mostly something that you get to
deal with when defining
functions, and if you have some
flexibility in there. So
generally speaking, you should
prefer using some or generics
over any whenever you can. So
you often don't want to use a
box that conforms to a protocol,
you want that object that
conforms to the protocol. Sounds
weird, right? Or sticking with a
pizza analogy
that Donnie Walz has put in his
article. And he will hand the
runtime a box that says pizza,
and it will need to open a box
to see which pizza is inside.
And with some or generics, the
runtime will know exactly which
feature it just got. And it'll
know immediately what to do with
it. Toss it if it's a why or
keep it if it's a pepperoni
pizza, if that's at least your
taste preference with pizza,
right? A lots of use cases, you
will find that you actually
didn't mean to use any, but you
can make some orange generic
work and according to the Swift
team, we should always prefer
not using any if you can,
because any is just too broadly
scoped. To help me understand
this summon any keywords stuff,
I also looked at an article on
the same topic by John Sundale.
That's a more technical overview
with a he talks about opaque
parameter types and primary
associated types. So there's a
lot more explanation of the
basics instead of diving into
like code samples as Donnie was
did. And yeah, if you'll come to
grips what the summon any
keywords do in Swift 5.7 through
the article by Daniels, and you
want to know some more detail,
definitely check out the article
by John sandal because it allows
you to get to understand some of
the internals and the naming of
these summon any keywords so
that you can in conversation
with other engineers have a good
conversation about what summon
any actually means semantically
to the compiler. So Swift 5.7
doesn't just make swift generic
system more powerful. It
arguably makes it much more
accessible as well as it reduces
the need to use generic type
constraints and other more
advanced generic programming
techniques just to be able to
refer to certain protocols.
Generics is definitely not the
right tool for every single
problem. So John really argues
that some is not always the best
option in all cases, but If he
does agree that when it is the
right option to use, being able
to use Swift generic system in a
much more lightweight way is
definitely a big win. A lot of
new things have been announced
in Swift 5.7, I'm still coming
to grips with all the new
features. But with the help of
these articles by Paul Hudson,
Daniels and Johnsonville, I
think I definitely am on the
right track. Challenge, though,
is that I don't want to run the
latest and greatest X code,
better versions on my production
machines. And sometimes you do
want to play around with some of
these new language features,
regardless without having to
mess up your entire development
environments. And that's where
there's this nice article comes
in, it's an article by a spent a
Smith. It's called trying news
fit features on Linux through
Visual Studio dev containers. So
the reason that span rods
article is that with every WWDC
there are new and exciting swift
features. And you're well
trained to download the latest
latest Xcode betzest to try them
out. Sometimes, however,
downloading Xcode isn't enough,
because features might have
dependencies on the Mac OS
version as well. So you want to
use specific features, but you
also have to upgrade the host
operating system, right. But
this is, of course, a problem
because nobody ever installs
better software on their
devices, right? Right.
Especially if it's your like
daily drive device, you don't
want to get better on there. But
what if there's like a safer and
faster way to get to all these
new language features, and that
operates and function completely
as intended in the language
specifications. So spend
actually argues that you can use
Linux through Visual Studio Code
def containers, and you need
three bits of software to be
able to do this on your machine.
And that's actually Docker for
Mac, Visual Studio code, and
Visual Studio Code, Swift
language extensions. And then in
his article, he goes into detail
what you need to do with these
three pieces to make sure that
you have a working def container
that you can access with Visual
Studio code that's running in
Docker, so you have a full
runtime environment available
isolated in the Docker
container. So it doesn't mess
with your with your system or
any stability on edit on other
areas of your system. And it's
it's a great way to just try to
try out a few of these language
features without having to fully
invest in running better
operating systems on your
hardware. So I really like the
the idea there. And of course,
some of these new language
features that were introduced in
Swift 5.7 Are there to enable
new things in Swift UI for iOS
16. Right. Paul Hudson also
wrote an article titled what's
new in Swift UI for iOS 16.
So basically, it's an overview
of all the new, more visual
components that are available in
Swift UI. So the big stuff, as
he calls it, is like displaying
a bottom sheets. Positioning
fusing the fixed grid layout
detects location of tap inside a
few. That's something you can do
now with Swift UI. And let us
share content using the system
share sheet. So you sharing
content from your app should be
a lot easier compared to how it
was on iOS 15. How to ask users
to review your app, Apple
tweaked that a little bit as
well. And there's a new date
component available in Swift UI
that allows you to do some
really cool stuff in allowing
users to select multiple dates.
So you're not using these
rollers anymore, but more like a
calendar date based components.
There are awesome smaller
improvements as well. So that's
dynamically changing between V
sec and H tech, how to dismiss
the keyboard when the user
scrolls and how to hide scroll
indicators in the scroll view
lists are more how to hide the
home indicator and other system
UI and how to let us paste data
into your app system gestures to
stop them interfering with your
own gestures and how to
dynamically adjust the color of
SF symbol. And this will enable
some really cool things as well.
Because as if symbols are a lot
of them now have also numb a
number of states. So if you have
the Wi Fi can in SF symbols, you
can now actually animate that in
several steps. So there's a lot
of stuff to unpack in Swift UI.
And just getting started with of
course, the WWDC videos about
Swift UI. But also the article
by Paul Hudson to get you on
your way is a really good one,
especially because the Paul
Hudson article has a lot of
source code that you can copy
paste and try in playgrounds.
Because we're not running the
latest Mac OS yet and you cannot
copy code from from from a video
frame as you can do now with the
latest Mapquest Ventura. So I
think that's a really cool thing
to have look at on the article
the second article that I
mentioned by Paul Hudson to get
you on your way with Swift UI
One big new feature in Swift UI
is actually swift UI navigation
API's. And Natalia Ponferrada.
Has a nice article on what's new
with this navigation stack. It's
available on iOS 16 and Mac OS
13. And it allows you to define
stack based navigation and multi
column navigation. So it's a,
it's a, it's a good improvement
over the Navigation Controller
of UI kit, with some great
additions. And, yeah, I think
it's good to have a look and be
familiar with this navigation
stack. We can't use jet on iOS
15, of course, because it's not
backported. But I think this is
the new way of doing stack based
navigation in in iOS
applications in the foreseeable
future. So the article by
Natalia has a nice overview of
what is navigation stack is how
you can use it, how you can
actually programmatically
navigate in the navigation
stack. And that is actually also
has a split view support with
navigation split view. So if you
use a navigation stack based
application, you can quite
easily convert it to also work
really well on bigger screen
device like an iPad or on macOS,
really with an efficacious split
view. So and you can even take
that for that you can do tree
columns in the navigation split
view. So that's like a the main
view with detail with a sub
detail, which is really nice.
And yeah, some good code samples
there and a nice GitHub
repository at the bottom of the
article that you can click
through to get access to all
these code samples in one go.
Talking about cool additions for
the frameworks released by iOS,
Jordan Morgan actually wrote an
arc wrote an article called iOS
16, notable UI Kit additions.
And he goes over some of the
cool new additions that were
announced in iOS 16. First of
all, that's he mentioned the UI
calendar view, this is somewhat
of a similar control that you
have available in Swift UI now
as well. Doing a date selection
on a more like a calendar type
thing, multiple date selections,
even if you want to, you can
customize and tweak this thing
and do do cool things with it.
And in his article, Jordan
Morgan actually also details
some information about the
variable symbols. So that's,
that's the the the thing I
mentioned earlier, if you have a
Wi Fi Connect, you can actually
animate these, because they have
an animatable property that
allows you to change the state
of the of the SF symbol and how
it looks on screen. And you can
actually use that to animate
these SF symbols. So some,
there's also something in
relates to our collective fuse
and your table fused with
resizing cells. So it's always
been kind of hard to do that
dynamically. But there is now a
new bit of API available self
sizing, invalidation enabled,
that allows you to make sure
that resizing cells just works.
So in quite often, this should
just work. But if it causes
issues, you can always turn this
off. Again. Another great
addition for UI kit is actually
that there's been some
substantial improvements in
support of Swift UI views in
TableView cells and UI
CollectionView cells. And this
is really something that allows
you to gradually incrementally
transition your codebase from UI
kit to Swift UI, so that you can
take yourself from the UI Kit
world into the Swift UI, few
worlds, gradually installed,
instead of having to do this in
one big swoop. For each screen
incomplete and completion, you
can you really do this on the
cell level, which allows you to
do this more gradual, which is a
good addition as well. Some
other small nuggets that are the
improved heuristics for
detecting money, a physical
values with date detectors. This
is of course, something that is
also available for swift UI. And
there's a whole bunch more stuff
to discover. So John Morgan
thinks that we will see an
inevitable rise of Swift UI, but
he can't help but smile as he
writes an article in his series
for each year since iOS 13.
Right after WWDC, he made the CS
he has new what's new in Swift
UI articles hit why not switch
wise, excited, I exciting and he
loves it. But for now, UI kit is
still here and doing its things
and wow. It's been adding a lot
of great stuff this year,
according to Jordan Morgan. And
while Apple keeps improving UI
kit in such substantial ways.
You can rest assured that Jordan
Markel will keep talking about
that as well. Speaking about new
additions to iOS 16 Is that
creating a detent in with a
custom height in iOS 16. So, a
custom detent height is a
concept that is something that
you have to be aware of, because
if you present a modal sheet
From the bottom enter your
screen, you had to depends on it
medium and large. So that
determines how much area you had
to put controls. In view on this
your sheet presentation, what
you can now do is make custom
defense. So you not only have
medium and large, you can also
use a detent that is suitable
for you need for your knees so
you can make it smaller or
bigger. It's good one to be
aware of. And Stuart
Breckinridge has an article
about it, which is just two code
samples with some text around it
called Create a detent with
custom heights in iOS 16. My
colleague Stefan blas also wrote
a nice piece and that's the
What's New in Xcode 14 article.
And so there's four big areas of
improvement that Stefan has
seen. And that's source editing
and swift UI, improved previews,
multi platform development,
testflight, feedback analytics
and significant performance
improvements in Xcode overall,
he will go through each of these
four items and explain why he
thinks these are big
improvements to Xcode. It's a
nice article with a lot of
graphical assets in there to
help make the points and the
case for what Stefan is arguing
about, Stefan things that have
been there have been huge
improvements in Xcode in this
new version. So while many of
them are under the hood, and
there's also many things that
make the life of you as a
developer easier every day.
Personally, Stefan thinks that
these four things are the most
important improvements to x
codes for you as a software
developer, and he's really
looking forward to a stable
release. And while some people
might argue that it's about time
that certain features land, he's
very happy that Xcode has
improved every year and that we
are getting these nice
additions.
Speaking of Xcode improvements,
Swift package manager now
supports plugins. And with Xcode
14, Xcode actually integrates
with the Swift package manager
plugins. And Marco Edinger has
an article on this very specific
topic. So let's flip back to
Plugins can be divided into two
types command plugins and build
two plugins. And both were
introduced in Swift 5.6 and work
in Xcode 13.3 when using Swift
packages, so what changed in
Xcode 14 with Swift 5.7 rights.
So what you get now is that
command plugins can be triggered
within Xcode. So if you add a
command plug in to your Swift
package definition, it will show
up in your Xcode menus, which is
like really nice because it
allows convenient and easy
access to specific command
plugins that you have embedded
in your codebase. And command
plugins can be executed on Xcode
projects now. So that's really
cool. So that also means that
Swift package manager is used
more and more under the hood of
Xcode projects, which is good.
And build plugins can be
executed on Xcode projects as
well. So what this means and a
build plugin is something that
runs at build time in your
codebase. And it allows you to
now execute those on Xcode
projects again, which also adds
to the argument that it seems
Swift package manager is used
more and more under the hood in
Xcode projects. So all in all, I
think those are some really cool
additions to Xcode build system
as well. So definitely check it
out. And there's also some
information in the article by
Marco on how you can actually
get started with your own Swift
package plugins. A specific
article that I really enjoyed
was the use Xcode for server
side development. It's on WWDC
notes, and it's written by its
yard goodness, and Federico
Santa Telo. And it's basically
some notes on this same title
session from the WWDC side of
things. So Apple released a
video called use Xcode for
server side development. And
it's basically a really cool
video done by Apple during WWDC,
in which Apple clearly indicates
that server side Swift is here.
And server side Swift is
something you should look into.
And they are using vapor swift
as the prime example of how you
can use Swift on the server
side. So this is a really good
indication that if you want to
do some server side development
with Swift, Apple thinks that
you should use vapor for that.
So really cool to see that and I
really liked the vapor project,
because I'd already did some
really cool things with that.
And just so you know, this fifth
package in that index is
actually built with vapor. So if
you want to get your hands on
some vapor codes, just have a
look at this fifth package,
index codebase. And you have a
substantial size vapor project
right at your fingertips to just
play around with and I know
Dave, we're really likes it if
people look at the Swift package
index codebase and suggest some
improvements with by by
submitting a pull request or
giving some feedback through a
GitHub issue on our on the
discord server that Dave hadn't
as made available for the Swift
package index. And then I'm
already up to the final article
of my long podcast episode. And
that's the one titled Setting up
your first car play app, it's a
article by Paul Palin. And
getting started with CarPlay is
easier than you think, according
to Paul, and in his post, he
will walk you through how to set
up CarPlay. And get started
using CarPlay in your simulator,
so you don't need to have a car
or a headset unit available on
your desk. But it's, it's a good
overview of how you can actually
get started with CarPlay
development. And
Paul goes into some details of
what CarPlay actually is for
you, as a developer and how you
should interact with it. And
it's a good overview of what
steps you need to take to be
able to do CarPlay development.
And, yeah, it's really cool,
because you'd need to do some
things a little bit differently
in your application. But once
you do, you can really launch a
CarPlay simulator on your
computer, and have a play around
with with CarPlay on your
development environment. And,
yeah, it's something I'm looking
into a little bit myself because
so we'll be getting access to a
CarPlay enabled car in in July,
but all hopes because it's all
dependent on delivery of the
actual car and production and
all these kinds of things. And I
really noticed that car
manufacturer manufacturers have
a big impact of this silicone
shortage that's happening
worldwide as well, because the
car was actually delayed by a
couple months, because they just
did not have the right chips
available available to put in
the car. So that's kind of wild.
So that's the, the this big
thing a car gets delayed,
because the small things that
are embedded deep inside the
bodywork of the car are just not
available. And they just need
that to be able to create a car
nowadays to that actually works.
It's an electric car. So there's
more electronics in there as
well. But anyways, I really
enjoyed propellants article on
setting up your first CarPlay
app, because I'm planning on
getting into CarPlay development
a little bit myself as well,
just for the kicks of it. So
that concludes my WWDC wrap up
episode of my podcast. This is
just some of the articles that
I've been reading, to get up to
speed with everything that's
new, and announced during
Apple's WWDC. And I just know
that over the coming weeks that
will be more great in depth
articles and all the things and
topics that that talk about
everything Apple have has
released. And I really look
forward to those articles and to
share those with you. So thank
you for your time, it's a bit of
a longer episode than usual. If
you have any feedback, please
reach out on Twitter, send me a
DM or whatever is convenient for
you. And I look forward to your
feedback. Also rating me on
Apple podcasts or any other
platform that you use. That
really helps me and if you
submit a review anywhere, let me
know send me a message and if I
have the chance to confine to
review, I will make sure to read
it out on my next episode. Thank
you for your time and I'll talk
to you again next week.