Read the transcript
Jeroen Leenarts: Hi, and welcome
to episode 43 of my podcast app
Force One. My name is Jeroen
Leenarts. And I've been
developing iOS apps for nine
years and I'm brand new Dutch
cocoa has for close to eight
years. If you're an iOS app
developer, you should listen to
my podcast because we'll keep
you updated some interesting
articles, and events you might
not have heard about. In this
episode, I'm going to talk about
handling links with Swift you
eyes open URL, how to write unit
tests for swift UI apps, unit
testing, UI view, action and
gesture in Swift, how to show
multiple alerts on the same view
in Swift UI, how to use throwing
properties to catch failures in
Swift. I also wanted to mention
my workshop on September 2,
there's a lot of work going into
that already. And I'm really
looking forward to executing in
a few weeks time. What's very
interesting is that having to
review my own books material is
very helpful in seeing what
things I've been doing wrong
myself lately. And I'm really
trying to refocus on my own
efforts as a lead developer, and
trying to improve my day to day
work based on my own work. So
that's very, very meta,
actually, that's actually
happening in this way. But also,
it means that I have a lot to
teach, including myself, and
really look forward to people
joining me. So if you want to
learn more about becoming or
being a good lead software
developer, then have a look at
my book and my workshop. And in
my workshop, I am going to try
to give my participants
actionable piece of content and
advice that they can execute on
immediately after the workshop.
So that within a couple months
time, they should have real
effects of having participated
in my workshop. So it's, it's a
big goal. But I think it's
worthwhile for you to check out
my content, I'm a workshop, if
you're into these kinds of
things. And if you want to grow
as a software developer, on that
note, there's also a very
interesting book that I wanted
to mention. It's a book that
I've been reading myself, it's
called staff engineer leadership
beyond the management track by
well Larson i What's very
interesting about this book,
that it's, it's actually making
a case for having to develop an
tracks for software developers.
On the one hand, that's the
classical thing that you usually
end up with. So you, you start
your career, you start
developing software, and then at
some point, you hit the ceiling.
And then the only way out is to
go into into a sort of a
leadership role in the sense
that you have to become some
kind of project manager, or
engineering manager, or even a
chief technology officer of a
company, there's a long road to
actually grow into this
position. And in his book, will
Larson actually advocate that
there should be another ladder
that you could climb as a
software developer, and this is
a technical ladder. And these,
this is a role that takes you
from junior to immediate to
senior, and then at some point,
you will end up as a staff or
principal engineer. Now, we've
all seen these, these job
titles, and it's even for me,
it's it sounds big and scary.
But yeah, I do notice that with
his book, it's it's very
interesting to to see that are
maybe even options out there.
And that you should look beyond
the confines of the job title
and the job role that you're
currently in. And not even just
for growing vertically in an
organization. But also to just
understand that your current
role, your current position, as
a software developer, it's not
what defines your career. And if
you want to change it, then
right now world circumstances
are in such a way that you can
quite easily make a career move
or make career switch, because
it's really a candidate driven
market right now. So you as a
job candidate, can pretty much
based on your skills dictate
what what companies and
employers should offer you as a
software developer. So that's,
that's a very opportune moment
that we have right now in the
world. So I highly recommend
anybody who's in the field of
software development to be aware
of this and to not take
advantage of it but to have an
impact on yourself and, and your
surroundings that is mutually
beneficial. So something to
think about beyond iOS software
development. Now on another
note, the mechanical keyboard,
dark hole I tripped into has
deepened itself even further. So
there's now a switch kits on its
way with I think they're called
Calle speed bronze switches.
I've been testing a lot of
different keyboard switches
lately, and it seems that I'm
going into the domain of speed
clicky switches. So those are
keys with a very short travel
before they actuate and What I
really like about these kill
switches is that they have sort
of a double clicky effect. So
once you press the button,
there's a mechanical click. And
if you release the button,
there's a mechanical click, as
well. So definitely highly
recommended to only use these in
a home environment in the attic,
away from as many people as
possible, because these things,
they make a lot of noise. But I
really like to feel and the
sound when I'm typing on them, I
hope because right now I'm using
kale box wide switches, which
are really big, but I really
like some less travel in my
switches, if possible. So enough
on the keyboard schools are
about to start again in the
Netherlands. So I expect to
share little bits of information
on how things are going with my
daughter. Because before the
summer vacation, I was already
sharing some information on her.
But there's a lot of things that
are going to change in her small
life, especially the peer group
that she's going to be a part of
in in a few weeks time. And I
really look forward to seeing
how she will be in this
environment. And I really hope
that it's something that matches
up with what she needs and what
allows her to really be more
herself in any circumstance that
she is in as a little girl
that's only six years old. So
fingers crossed that things work
out the way that we hope my wife
and I for our daughter. And
yeah, let's just get started
with the articles of this week.
First article is by Federico
Sena Telo. On his five star
blog, it's called handling links
with Swift UI is open URL. So
it's an article about using Open
URL in Swift UI. But there's
been a number of upgrades to
attribute strings and the text
view and how open URL function
works. In his article, Federico
gives a nice overview of what
you can do with the link and how
you can use a text and how you
can actually call open URL in a
way that it's it's very nicely
formatted on screen as a as a
button styling as well with
various font and text
attributes. It's very simple, if
you know, Swift UI and how to
influence a text display. But
just seeing it in action in his
article with lots of screenshots
and sample code is really nice
to remember you about what Open
URL is, is about. There's also a
section with what's new and the
latest Xcode 13. Better. So that
means that this article is fully
up to date with the current
state of things regarding the
open rail function. Also, he
goes into how the URLs that you
open through this API are
handled, and what things you can
actually derive from these,
these URLs once you're handling
them, because there's actually a
lot of things that are available
to you and really dig into. And
you can do nice things based on
this. And you should really look
at federic this article to get a
good grasp an overview of this
nice little API in in iOS. Next
up is geo with Mocha coding. He
has an article on how to write
unit tests for swift UI apps. So
it's a question that you hear
quite often from soft developers
getting started with Swift UI.
How do you write unit tests for
swift UI apps?
With its declarative approach to
development, and it's opaque
types. Swift UI doesn't lend
itself to writing unit tests,
our UI and snapshot tests are
the only option that you have?
Or should you generate multiple
previews for every behavior, and
permutation of your views? The
answer is actually simpler and
doesn't require that much, or
any extra tooling, just good
software design. So to test you
swift UI applications, don't
test swift UI code. And in his
article, geo actually shows you
how to write unit test for the
actual logic behind the Swift UI
app by decoupling layout
declaration from content
generation. And, yeah, it's very
solid overview of how you can
separate your UI from the actual
logic that is within your app.
And I think it's it's a good
overview of an approach that you
can take to actually add unit
testing to a swift UI code base.
Now, just to remind you on UI
testing, and what you can do
with that, there is an article
by Benoit Bhaskar that he has
released this week as well, or
at least in the last week. It's
called unit testing UI view
actions and gestures in Swift.
So it's an article on how you
can use UI testing on a UI Kit
based view hierarchy, to
actually have interactions with
your user interface and to use
mocking to make sure that you
can actually display all the
different variations of your
user interface. So very
worthwhile article to remind
yourself on what you should be
doing with UI testing in UI Kit
based applications, and also a
good starting point. If you want
to get into the previous art
article that I mentioned by Geo.
The next article that I wanted
to mention is by siaran. You can
find it at saruni w.com. How to
show multiple alerts on the same
view in Swift, why? Swift UI
can't have multiple alert
modifiers on the same view, the
same branch and a few hierarchy
to be exact. And only latest
outermost alert will work. If
you've got multiple alert
modifiers in the same branch and
a few hierarchy. So in his
article, saloon details high can
have multiple alerts on the same
view regardless. So according to
this rule, this is actually a
bug in iOS 1314. That's now
fixed in iOS 15. I haven't dealt
with this Personally, myself.
But I do find this article
interesting in that he seems to
find ways to use Swift UI. In a
way that's Yeah, that might seem
non obvious. But once you're
really developing some software
with it, that it's actually
something that you will run
into. So it's a good solution
for a problem that you might get
if you're having to display
alerts on your user interface.
And I think it's a good one to
be aware of the test. This is
actually a big difference
between iOS 14 and 15. And,
yeah, so just to be aware of
changes coming into iOS 15, I
think this is an article that is
worthwhile to read. And if
you're especially having some
issues with alerts, then make
sure to check this out, because
maybe this is something that
applies to your situation. The
next article is by Antoine
formulae, he has a nice write up
again, on how you can use strong
properties to catch fish in
Swift. So this is a big change
that's coming in Swift 5.5. And
it's basically that you can now
tro from getter functions within
a fire. Just have a look at the
first code sample in his
article, and you know exactly
what I'm talking about. What's
interesting here is that Antoine
provides a great overview with
all the source material from the
original swift evolution
proposal, which is SC 310. And
it's a big part actually, of the
async await concurrency changes
that allow async properties to
throw errors. So it's it's one
of these essential features in
Swift 5.5 that are required to
actually be able to use async
await within this new version of
Swift. In this article, Antoine
details how you can define your
own trolling properties in
Swift, and how you can define a
trolling custom subscripts if
you'd like and how you can
define a troll and getter for
stored properties. So he has
some thoughts and also on
whether or not you should decide
between a throwing property or a
throwing method. And it's, it's
so well worth and balanced
article on this new great
feature in Swift 5.51 of many
new features in Swift 5.5, I
should say. And now it's time
for Dawn is Monday morning
tweets. Then Steph is hoping
Donnie had a great weekend he
released a new tutorial
explaining his thought process
on how he would architect an app
with async await and MVVM in
Swift UI. Phillip Nemecek shared
an idea on Twitter last week,
and now he's working on in the
app store. And he's really
excited about it.
Daniel is working on the app
telemetry app some more and
there's a lot of work that goes
into actually making a company.
Mohammed just released a small
app this week to stay up to date
of the latest updates of Apple
systems called I betta. And
Daniel is speaking at cokehead
Snell on Wednesday. He's very
excited but he's also feeling a
bit intimidated. And Trent is
rebuilding his native iOS app
with React Native as an iOS
development iOS only release has
been a dream sport, but it's
time to expand. Rove is building
pinboards at to do Cameron app
using switch wire for Mac OS and
eventually iOS is building out
in the open so he's tweeting out
in his progress in the thread.
Azzam is preparing for the try
swift talk on async await. Luke
took some time over the last two
weeks to travel back to the old
days of iOS six as he approached
recreating the Weather app a UI
kit and laying out the UI in
VFL. James is thinking about the
next applicants will it be
September 7 or September 14,
with pre orders on the 10th or
the 17th and the launched on the
24th is thinking about blocking
all those dates on this
calendar. And Max is really
happy he got a message that he
has passed his trial periods and
Marius has worked on the
marketing materials and press
kit for an app active me and
made it available for pre order.
What is relaxing after a hectic
week hacking together a
temporary sites for Maxime SDK
for a national Danish Radio Show
podcast and he appeared on the
show yesterday. The site isn't
Danish but you can navigate the
shells and see the photos and
That's it for this week. I
really hope you enjoyed a
podcast episode this time
around, do have a look at the
show notes and links that are in
there. If you want to help
support my podcast, please
consider becoming a pot fan. You
can find it at pot dot fan slash
approach one and you'll get
early access to my interviews.
I'm just short a few fans of
being able to afford
transcription of my podcast so
that I can reshare the content
in a readable format, which
would really help with me
growing my podcast. Talk to you
again next week.