Read the transcript
Jeroen Leenarts: Hi and welcome
to the 56th episode of my
podcast. In this episode, we're
going to talk about checking if
swift UI view is in preview, how
to make a Mapquest menu bar app
async few asynchronous loading
operations in Swift UI.
Composition first inheritance
code architecture solutions
explains the Swift building a
blockchain is swift, and Danish
Monday morning sweet. So let's
get started. Some US holidays
are approaching us quickly. And
I just wanted to jump into that
feast as well. So Happy
Thanksgiving, everybody, and
have a turkey sandwich on me. So
if you use the promo code,
Turkey sale 2021 on my Gumroad
page, you will get a 50%
discount on my book. link is
also in the show notes. So you
don't have to enter the discount
code manually. Because I'm a
little bit time constraints, I'm
going to dive into this week's
article right away. So the first
article is checking if a swift
UI view is in preview. Shift UI
preview is a fantastic piece of
development tooling to quickly
iterate UI designs in expert,
but sometimes to code in your
view just doesn't work or worse,
it crashes to preview action.
How can you work around this
issue Rokkor, in his article,
ran into a couple issues with
Xcode preview. And he looked
into what things you can do to
make sure that your Xcode swift
UI preview isn't crashing. It's
a nice overview of some tricks
and things that you can do to
make sure that your Swift UI
view in preview is not using all
the aspects of your normal
runtime, but that it has like a
constrained environment and also
how some issues are easily
debuggable. Industry software
preview saloon has an article on
how to make a Mapquest menu bar
app. Why am I including a Mac OS
article in this week's episodes,
this is actually something that
I use myself. And I wish I had
saloons article to just point me
in the right direction from the
get go. Sometimes you just want
to have a little bit of logic.
And up to a certain point I was
just playing like command line
utilities for written in Swift.
But if you use a macro as menu
bar app, you can take the same
concepts and make it very
convenient to do quick actions
that are available in the Mac OS
menu bar. And this allows you to
to just have a quick utility
available at a moment's notice.
If you ever have some sort of
tooling that does these kinds of
things. It's also a little fun
introduction to some aspects of
Mac OS development. And, yeah,
all in all, it's pretty much the
same as UI Kit developments with
a lot of different API and a lot
of caveats that you need to take
into account. But in general,
this article is a nice intro on
how you can create one of the
small icons in your menu bar on
Mac OS. The next article is by
Rolf Ebert async few
asynchronous loading operations
in Swift UI. In his tutorial, a
swift UI view component is
developed for handling in
progress and error states when
loading data asynchronously
based on exam projects at large
JSON data via async await. It's
an exercise in creating
abstractions and using Swift
generics in practice, it's a
really nice article with some
nice looking artwork in there as
well. And what's really fun
about Ralph's tutorial is that
it's a really nice example of
what was just discussed handling
in progress aerostats using
async await, and using some
extra abstractions on top of all
these things, with some swift
generics to make a very
convenient little API that that
you can reuse again and again,
and so on finally, has written
an article on a little bit of
architecture, when you should
use composition and when you
should use inheritance in your
code. And he explains these
concepts with some code samples.
So inheritance, obviously, is a
subclass of superclasses.
Antoine goes into more depth
than that. And what is
Composition Composition comes
down to combining multiple parts
to create a new outcome. So this
is also a nice thing that you
can use in practice. The goal of
Anton's article is to explain
what these two things do and how
you can implement them in Swift.
And it's just a nice reminder of
this aspects of software
development. If you're using an
object oriented language of
course, that you should consider
composition and inheritance very
consciously to make sure that
you use the right approach for
the right situation. Philippa
cherry has written a simple
proof of work blockchain
inspired by built Bitcoin and
it's built in Swift, so keyword
heavy thing here, but if you
want to get into some basics of
blockchain type thinking, it's
it's a nice start off A series
of articles that gives you an
overview of how blockchain could
work. I don't think that the
code is as robust as as Bitcoin,
just due to the fact that not as
many eyeballs have had a look at
this implementation by Philippi.
But it's a nice thought exercise
to get some insight into
concepts that are related to
blockchain technology, because
it's, it's something people
really talk about a lot. And it
was an interesting read. And
there's some fun bits of code in
the articles by Philippe. Donnie
wish everybody Happy Monday, of
course, on Twitter, as he does
every week. And the first person
responding is CRISPR. Sally is
doing a new hongo pro Black
Friday sale. And the hongo is an
app that helps you translate
Japanese language on the fly, if
you see it somewhere in the
world, especially for in Japan,
of course. And yeah, he's just
having a Black Friday sale. So
if you ever go to Japan, or you
have an interest in Japanese
language, just have a look at
his product. Chris has already
been a guest on my podcast. And
it's a very interesting story
that he has to share with you.
Then you'll Steinberg is trying
to get a mental model for
functional programming with
Swift UI, pre swift UI, his
understanding was that you have
multiple layers on the outside
and an immutable core. But with
Swift, wide views are value
types. So there's a mutable
filling between view and core.
And that's his current quest to
understand that that's typical
Daniel Steinberg thinking that
he wants to go always want
abstraction deeper, and that's
why such a good teacher in my
mind. tipper Bowditch is
planning to integrate his DSL
libraries with vapor and start
updating his Feder CMS code base
to support the new async await
features. So he's doing a lot of
backend development again. And
Leo G. Dion is doing the usual
thing which is lots so he's
updating his analytics library
in Swift working on get century
swift library, pushing Objective
C episode with Iowa's Lake and
finishing edit on the next
episode with at underscore
insights and order a new vehicle
for the family getting ready for
the last 2021 episode with at
compile Swift, and he's still
waiting on the little munchkin.
So a very busy week, but also
very exciting times ahead for
Leo. So Leo, hope everything
works out and that you don't
have to wait too much longer.
And that delivery is right on
time. But when I was making very
little progress with the
preparations to open source, the
biggest chunk of code that is
ever released, it's pretty much
1000 lines of Swift code. But
yet progress isn't as he would
have faced, but still hope he
can do the work and that he can
get through it. So I'm curious
to see what Pawel has to share
with the world as open source.
Adam Overholser is looking for
Spanish, Russian and Portuguese
better testers for his
cheatsheets app. And XL the
panic is starting to revamp his
app settings and he plans to
finish that this week so he can
move on to the core engine of
his app the trip recall, Andrew
is working on a concept package
for swift UI preview so that you
can easily see prints messages
without having to run the
simulator. He loves previews.
And with this just helps him
work faster. He'll post more
info later this week. So maybe
we should follow at the craft by
Brett's for more details. Eric
Lippman is going to dive into
project modularization. This
week, he started by watching sub
digital stock from Spain, which
already was pretty helpful to
get point started. And he's also
trying to get our different apps
teams to find more common ground
and use their synergies. Camille
to stern offski is announcing
that tomorrow he will be posting
another article and he has a
small teaser of the contents of
it. It's a big image with Mobius
that says, What if I told you
you can talk with your
application. Even continuous
saying that it's a big week for
the company he's working at.
It's the product release week.
So exciting times it seems for
him and flow right code shares
that last week he prepared
Blackfyre itself for its apps,
which just started today. So a
lot of big percentages off of
his apps. So 50% off of the Pro
versions of Yamo and 550 coins
and even 66% of all operators.
So all in all, a lot of people
aren't announcing Black Friday
sale. So have a look. And Donnie
waltzes threat, the links in the
show notes and maybe there's
like a little tool between it.
Maybe there's like a little tool
in there and that's something
for you and that you can pick up
at a huge discount right now. So
I hope you all will be having a
great week and I know I am
because I've been very busy last
week and probably this week that
continues. But just today early
I've heard that the deadline
that I'm working towards is
actually December 7 And
initially I thought it was end
of this week so that gives a
little bit of time to actually
get what I'm working on up to
spec and out the door so talk to
you again next week